-
Notifications
You must be signed in to change notification settings - Fork 927
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
setUserToken #278
setUserToken #278
Conversation
Thank you i was look for solution like this... |
@dgwight Thank you for your great pull request |
Great. Hopefully this will be released soon |
This PR has been published in v4.6.0 |
@dgwight Why does calling I had to use |
I didn't open an extra issue because I feel this is still part of the PR. The solution for me was to simply comment out the line mentioned above. Since the setUserToken overwrites the token anyways it made no difference. |
@itsrachelfish the redirect unintended, the code for setUserToken absolutely was "lazily" copy-pasted from "login()" for the initial PR. @T0TProduction could you push up a fix with that line removed? |
@dgwight ^ opened a PR but I guess it will take some time until someone reviews it. |
Released with v4.9.0. |
After registration and reseting a password, my api returns an auth token and which I would like to use to set the current user.
To do this currently, I was using code that looks like this:
I believe this is a common use case, so this pr adds a function
$auth.setUserToken(token)
to correctly set the user with an auth code. The functionsetToken
does not set the Authorization header, so it doesn't handle this use case very well.Thanks!