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
(I put console.log here and see that the "mounted" appears twice 🤔 which cause a bug later)
Redirect to callback, vue then pass the authorization code to laravel API
Then laravel grab the authorization code and send POST request to github token endpoint to exchange code for token, this works no problem. Then laravel use jwt-token to generate access token and send response to vue.
From here I got really confused:
🤔 I see request from vue to laravel API to fetch user info /api/user and this return 200 OK. I can't find the source code where vue-auth triggered this request
😵 The POST request to token endpoint is sent twice, the first time the request is 200 OK, the tokens is return but the second is failed with 400 Bad Request. Obviously with the same code can only be exchanged once. Github response is correct behaviour but I don't know why vue send request to API twice (as I put console.log in mounted() and it shown twice)
😵 Auto logout on refresh page
if I login using email/password, refresh page no problem
login using SSO, after refresh page, token in local storage is deleted
also I see that if I login by SSO, I don't have the field 'rememberMe' in session 🤔
The SSO login works, I get user information, have access token but I got 2 errors above.
The text was updated successfully, but these errors were encountered:
Ah not sure but seems you have a mixture of old and new code maybe. Perhaps make sure you are using latest version of the plugin first otherwise the docs might be a bit off.
Hello, first thanks for a awesome work!!!
I'm using laravel 6.2, jwt-auth 1, vuejs2, vue-auth 2.21.16-beta
Trying to implement Sign in with Github, but I got some weird issues, trying to fix for 2 weeks already!!! 💦 @websanova
Here is my setup:
oauth2GithubDriver.js custom OAuth2 driver
app.ts
AuthLogin - WORK
Redirect to github just fine, and return authorization code
AuthCallback
(I put
console.log
here and see that the "mounted" appears twice 🤔 which cause a bug later)Redirect to callback, vue then pass the authorization code to laravel API
AuthController.php
Then laravel grab the authorization code and send POST request to github token endpoint to exchange code for token, this works no problem. Then laravel use jwt-token to generate access token and send response to vue.
From here I got really confused:
The SSO login works, I get user information, have access token but I got 2 errors above.
The text was updated successfully, but these errors were encountered: