Hi,
I am using the CustomAuthentication to authenticate with another service.
I want to store some information on Nakama about a custom account ID and then each login query that to make sure the AccountID from the client matches their original when they first logged in and an account was created.
If the AccountID they sent from the client doesn’t match that which we have on the backend I want to reject the auth, however, by the time the UserID is available to check the storage we’re in the afterHook and Auth has been granted.
I thought I could force a logout but then the client just re-auths next time it needs to make a request.
From my understanding there is no way to get the UserID during the beforeHook as it’s before the auth has occured.
Any help is greatly appreciated,
Thanks,
Rob.