Skip to content

How can I find out which auth provider was used for signing in? #11300

Answered by k-taro56
Le0X8 asked this question in Help
Discussion options

You must be logged in to vote
export const { signIn, signOut, handle } = sva(async () => {
	return {
		events: {
			async signIn({ account }) {
				console.log(account?.provider)
			}
		},
		callbacks: {
			async signIn({ account }) {
				console.log(account?.provider)
				return true
			},
			async jwt({ account, token }) {
				console.log(account?.provider)
				// Add provider to token
				// token.provider = account?.provider
				return token
			}
		},
		providers,
		pages: {
			signIn: '/login'
		},
		trustHost: true
	};
});

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@Le0X8
Comment options

@k-taro56
Comment options

Answer selected by Le0X8
@Le0X8
Comment options

@k-taro56
Comment options

@Le0X8
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants