Skip to content
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

Possible Unhandled Promise Rejection: Error: Authentication failed #113

Closed
solidevolution opened this issue Mar 14, 2018 · 15 comments
Closed

Possible Unhandled Promise Rejection: Error: Authentication failed #113

solidevolution opened this issue Mar 14, 2018 · 15 comments

Comments

@solidevolution
Copy link

@solidevolution solidevolution commented Mar 14, 2018

Since today, i got the following error in my develop system (docker, webpack, vue-cli)

It still works on production, the only difference from dev system is:

  • not available from outside
  • no ssl

Here more information about the error:

bildschirmfoto 2018-03-14 um 17 29 08

bildschirmfoto 2018-03-14 um 17 29 39

bildschirmfoto 2018-03-14 um 17 29 55

The only thing that changed:

https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/
https://developers.facebook.com/docs/facebook-login/security/#strict_mode

But I integrated the URIs for strict mode already in december.

@billowapp
Copy link

@billowapp billowapp commented Mar 20, 2018

Getting the exact same error here but with the Google API.

@dgrubelic
Copy link
Owner

@dgrubelic dgrubelic commented Mar 20, 2018

Thanks for reporting this. Can you inspect response you get because, since error is thrown in .then(), it probably just didn't found token in your response. Can you paste your response here?

@solidevolution
Copy link
Author

@solidevolution solidevolution commented Mar 20, 2018

@dgrubelic can't reproduce it now, sorry.

@billowapp
Copy link

@billowapp billowapp commented Mar 20, 2018

Thanks for getting back so quickly @dgrubelic

herewith my server response

screen shot 2018-03-20 at 13 38 32

and herewith the error i receive

screen shot 2018-03-20 at 13 38 45

herewith my handler

screen shot 2018-03-20 at 13 40 27

I must add that im using laravel passport in conjunction with socialite, everything is working perfectly on the server side its just when returning the token that things fall over in the "then" of the promise.

@dgrubelic
Copy link
Owner

@dgrubelic dgrubelic commented Mar 20, 2018

@billowapp Have you changed you token name in provider configuration? https://github.com/dgrubelic/vue-authenticate/blob/master/src/options.js#L26

@billowapp
Copy link

@billowapp billowapp commented Mar 20, 2018

@dgrubelic the token name was the issue, thanks so much for the assistance.

@Justinio99
Copy link

@Justinio99 Justinio99 commented Oct 9, 2018

@billowapp Where can I change the token name and how does a token name look like?

@billowapp
Copy link

@billowapp billowapp commented Oct 9, 2018

@Justinio99, you'll see in the response screenshot i posted above that it was sending me back a p_token field instead of token

@Justinio99
Copy link

@Justinio99 Justinio99 commented Oct 9, 2018

@billowapp i don't know why, but we don't get a response

@Ethan0007
Copy link

@Ethan0007 Ethan0007 commented Dec 25, 2018

Hi,

I have same issue, i don't have response.

image

image

How can i send post request in .net core 2.1?

Thanks.

@diadal
Copy link

@diadal diadal commented Jan 16, 2019

@solidevolution please can you explain how you get response from /auth/facebook/callback
am using socialite for backend but not able to get the response

AuthProvider(p) {
              this.$auth.authenticate(p).then(response =>{
                                console.log(response)
                
                }).catch(err => {
                    console.log({err:err})
                })

            },

Error: Authentication failed

@solidevolution
Copy link
Author

@solidevolution solidevolution commented Jan 16, 2019

@diadal we use https://github.com/requests/requests-oauthlib.
Sorry but I can't help more because I didn't worked "Full Stack" on this.

@diadal
Copy link

@diadal diadal commented Jan 16, 2019

this solve my issue I create new package for laravel Vue (SPA) it work anyone can give it try

https://github.com/diadal/vue-social-auth

@solidevolution
Copy link
Author

@solidevolution solidevolution commented Jan 17, 2019

@diadal perfect, good work.
I hope your package get a lot of reputation and feedback from the laravel community!

@aren1989
Copy link

@aren1989 aren1989 commented Aug 7, 2019

I think you need to set 'p_token' to "tokenPath" in provider config like this
providers: { facebook: { tokenPath: 'p_token', clientId: '' // Your client ID, redirectUri: '' // Your client app URL } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.