You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now the token is valid for 24 hours, so if the user is on the site for more than 24 hours and then sends a request the server will reject the request because of a invalid token.
classTokenManager{constructor(tokenUrl,time=3600){// ... emit event if new token received}}classUploadGateway{constructor(tokenManager){tokenManager.on('changed:token',()=>{// ....});}}consttokenManager=newTokenManager('url');constuploadGateway=newUploadGateway(tokenManager);
The text was updated successfully, but these errors were encountered:
As @pjasiun mentioned, we TokenManager should be called Token.
I would call it just Token:
consttoken=newToken('url');constuploadGateway=newUploadGateway(token);token.value// the value of the token, also `change:value`, but note that it will be used only internally, for the external user it will be just a `token`.
Now the token is valid for 24 hours, so if the user is on the site for more than 24 hours and then sends a request the server will reject the request because of a invalid token.
The best option is to create a
TokenManager
(name to rethinking) in https://github.com/ckeditor/ckeditor-cloudservices-core that will download new token every X time from URL.Pseudocode:
The text was updated successfully, but these errors were encountered: