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
Hey there, I've got a suggestion for auth: It would be helpful to be able to re-auth at any point, in the case where the user's session is going to expire while the user is connected.
The text was updated successfully, but these errors were encountered:
Yeah definitely! Thanks for the suggestion. There's a couple ways to do this, I don't have an opinion around the implementation at the moment.
My initial thought is:
NaiaServer could expose a method like: send_reauth_request(key: UserKey, timeout: Duration)
Which triggers a ReauthRequest event on NaiaClient, which must be responded to using a send_reauth_response(reauthEvent: Event).
Then in NaiaServer you could either reuse the "on_auth()" callback method, or have a new "on_reauth()" callback, that processes the reauth event payload.
If a user does not successfully re-auth within the given timeout, then they are forcibly disconnected.
Anyone else have thoughts on how to go about this? Any good examples of other crates that have a pattern for this?
Hey there, I've got a suggestion for auth: It would be helpful to be able to re-auth at any point, in the case where the user's session is going to expire while the user is connected.
The text was updated successfully, but these errors were encountered: