-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
share set token method #186
Conversation
What's a use case for this? It is meant to be an internal method. |
For example: |
What exactly are you trying to save? An access token? Because |
+1 There is only one way to save token now - to use $auth.login For example I have other registration flow: user just put email, then receive email confirmation then go to the confirmation page and complete registration. So when user complete registration (it is now sign up already) server return auth token, that I want to save to be logged in. |
I want to have opportunity authorize user anywhere from any response without additional requests. As in your code private method shared.getToken() accesed by public $auth.getToken(), I want open access to private method shared.setToken({access_token: token}, isLinking) through public method $auth.setToken(token, isLinking). In this case:
|
@sahat what do you think? |
Going to throw my hat in this ring. I have a need
Unfortunately, |
I went ahead and merged this PR, meanwhile if you have suggestions to improve it please feel free to chime in. The only thing I don't like about this change is that |
Not really, no. @sars wrote it that way because using the existing In the case of "I want to require email confirmation," it would likely be more maintainable to simply authorize the user but indicate their email confirmation state in the payload, rather than craft your own temporary token. That's kinda the point of the payload: adding extra non-secret information that can be validated by client and server. |
(Although, @sahat, you are correct that the public |
No description provided.