Auth-module: Prevent redirect

Created on 29 Jan 2019  路  3Comments  路  Source: nuxt-community/auth-module

Version

v4.5.3

Reproduction link

None

Steps to reproduce

Add a login button and call a login function that user loginWith(...)

What is expected ?

I don't want to have the expected behavior which is redirecting after login, in my case Im using facebook. How can I make the process completely async?

What is actually happening?

Redirect to strategy page and comeback to to redirect url.

question

Most helpful comment

Hi,
in your nuxt.config.js add an option home to false

auth: {
redirect: {
callback: "/callback",
home: false
},

Bye

All 3 comments

This issue as been imported as question since it does not respect auth-module issue template. Only bug reports and feature requests stays open to reduce maintainers workload.
If your issue is not a question, please mention the repo admin or moderator to change its type and it will be re-opened automatically.
Your question is available at https://cmty.app/nuxt/auth-module/issues/c269.

Hi,
in your nuxt.config.js add an option home to false

auth: {
redirect: {
callback: "/callback",
home: false
},

Bye

@kaboume
I tried this but no luck. Any idea?

auth: { strategies: { facebook: { client_id: 'CLIENT_ID', userinfo_endpoint: false, scope: ['public_profile', 'email'], redirect_uri:'https://my-domain.com/callbak' }, google: { client_id: 'CLIENT_ID, user:false, redirect_uri:'https://my-domain.com/callbak' }, redirect: { callback: "/callback", home: false }, }, },

It still redirect the user to facebook/google login page.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abegehr picture abegehr  路  4Comments

yuwacker picture yuwacker  路  3Comments

nikkanetiya picture nikkanetiya  路  3Comments

DougHayward picture DougHayward  路  4Comments

AhmedAtef07 picture AhmedAtef07  路  3Comments