In Amity-Social-Cloud-UIKit-Web-OpenSource, how do I keep the users logged in under secure mode?
According to Security - Amity Docs and stuff, I see the process is something like
- frontend asks our application server for an authentication token
- our application server calls POST /api/v4/authentication/token and send the token back to frontend
- frontend passes that authentication token to
<AmityUiKitProvider authToken={...} />
Then, how do we keep that user logged in? like:
- does the
<AmityUiKitProvider />
automatically renew the authToken internally without us having to do anything - or, do we need to take care of token renewal by ourselves
- I see token renewal things here, and I’m assuming we gotta pass SessionHandler to sdk client, how do we do this with
<AmityUiKitProvider />
, seems like the client is initialized inside the Provider and I couldn’t find any props seeming relevant.
- I see token renewal things here, and I’m assuming we gotta pass SessionHandler to sdk client, how do we do this with
Would be great if there’s a sample code covers all these.