Replies: 3 comments
-
Hello @RonAlmog,
The configuration for the social login can be found in the docs, but here's mine: // nuxt.config.js
export default {
(...)
auth: {
(...)
google: {
watchLoggedIn: true,
scheme: 'oauth2',
endpoints: {
authorization: `${process.env.APP_URL_API}/v1/auth/google`,
userInfo: `${process.env.APP_URL_API}/v1/auth/me`,
},
token: {
property: 'access_token',
type: 'Bearer',
maxAge: 1800
},
},
}
(...)
} In this case, I'm calling my own backend who has the
As for handling multiple sign-ins from the same user, depends on your implementation. But I redirect to my backend so I get the OAuth provider's callback and the one thing they all have in common is the email. So when you get the data from FB/Google/etc. you could search your Then it's a matter of how you handle that data. Do you want to add "social providers" relation to that A quick google search yield a lot of results, here's one:Good luck :) |
Beta Was this translation helpful? Give feedback.
-
@JoaquimLey , thank you so much for your detailed answer, much appreciated! |
Beta Was this translation helpful? Give feedback.
-
I have an endpoint for each strategy with the client ids etc. but not for apple. Apple I have the frontend doing it but I'm thinking of migrating all my strategies to the frontend to simplify things as we can store secrets on nuxt with |
Beta Was this translation helpful? Give feedback.
-
Does anybody have a full working sample project that uses @nuxtjs/auth-next, with both local and social (fb, google), that shows how to integrate with backend? how to consolidate users from various sources to one place on both backend and frontend?
I need all users to be on the same database. the documentation does not even mention this. any clue, example, tutorial? thanks.
Beta Was this translation helpful? Give feedback.
All reactions