Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
920 views
in Technique[技术] by (71.8m points)

oauth 2.0 - Nuxt Auth Facebook provider not working with response_type: 'code'

I have the following Nuxt Auth 4.9.1 Facebook provider:

facebook: {
    client_id: '6************5',
    userinfo_endpoint: false,
    // response_type: 'code'
},

And I have a simple check in a plguins/aux.js file if auth has been successfull:

export default function ({ $auth }) {
  console.log($auth.loggedIn)
}

When I run the facebook provider without the response_type property I get redirected to the homepage and the log shows true and the URL looks like this:

http://localhost:3000/account/aanmelden?#access_token=******ZD&data_access_expiration_time=1619484487&expires_in=4313&state=eq8zpdIEM7g5xL3432oLm

When I run the provider with the response_type property I don't get redirected and the log shows a false and the URL looks like this:

http://localhost:3000/account/aanmelden?code=A*****Q&state=SvXz9jJHioOBwdpmF9eyE#_=_

There's no errors showing in the console log, there's no errors showing in the Network tab so I can't figure out why Nuxt Auth is failing when I use the response_type: 'code' property in the Facebook provider.

question from:https://stackoverflow.com/questions/65911399/nuxt-auth-facebook-provider-not-working-with-response-type-code

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...