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
Hello, I am developing an integration for Dailymotion using react and have run into the following problem when using the JS SDK:
Auth is completed successfully, I can see the session information when running DM.getLoginStatus (session expires in 1h), but when the time threshold is crossed, and the site is reloaded, the session is lost and login is required again.
First I load the sdk using a hook: const status = useScript('https://api.dmcdn.net/all.js')
This works perfectly fine for getting the session information, logging the username, but am I missing something needed to make the session refresh?
I have also noted that the cookie also expires in one hour. Shouldn't there be access to the cookie to perform the refresh? Is the cookie supposed to expire at the same time as the token?
Thank you very much for your time.
The text was updated successfully, but these errors were encountered:
Taking React out of the equation and just running plain JS + html, with the same results. Cookie expires in an hour and sesion breaks after that
Manually setting the cookie to expire later than the session. Problem persists (user is required to relogin after 1 hour)
Therefore I'm thinking that it is working as intended and I might be missing something required for the SDK to actually try the refresh? When the documentation says that the token will be refreshed "as long as the user interacts with the application" what does it mean? I am calling the API to log the username after DM.Init, which I guess counts as "interacting with the application".
However, exactly after the expiration of the session/cookie, it is destroyed and the user has to go through the authentication process of popup+user+password again.
Hello, I am developing an integration for Dailymotion using react and have run into the following problem when using the JS SDK:
First I load the sdk using a hook:
const status = useScript('https://api.dmcdn.net/all.js')
I do DM.init once the script is loaded:
My login button logic looks like this:
The response I get from getLoginStatus has the following fields:
This works perfectly fine for getting the session information, logging the username, but am I missing something needed to make the session refresh?
I have also noted that the cookie also expires in one hour. Shouldn't there be access to the cookie to perform the refresh? Is the cookie supposed to expire at the same time as the token?
Thank you very much for your time.
The text was updated successfully, but these errors were encountered: