Skip to content

"Unexpected ID Token returned" using Microsoft ADFS / Custom OAuth provider #6130

Answered by busch
busch asked this question in Help
Discussion options

You must be logged in to vote

In case anybody get into the same issue. I was able to fix it by using "type: 'oidc'" instead of "type: 'oauth'". Here is my working example:

providers: [
	{
		id: 'adfs',
		name: 'adfs',
		type: 'oidc',
		clientId: ADFS_OAUTH_CLIENT_ID,
		clientSecret: ADFS_OAUTH_CLIENT_SECRET,
		wellKnown: 'https://adfs.example.com/adfs/.well-known/openid-configuration',
		authorization: {
			url: 'https://adfs.example.com/adfs/oauth2/authorize',
			params: {
				scope: 'openid'
			}
		},
		issuer: 'https://adfs.example.com/adfs',
		token: 'https://adfs.example.com/adfs/oauth2/token',
		userinfo: 'https://adfs.example.com/adfs/userinfo',
		profile(profile) {
			return {
				id: profile.sub,
            …

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Ekkana
Comment options

Answer selected by busch
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@Bjornnyborg
Comment options

@lutfiarahmanda
Comment options

@yuanwen-tian
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
question Ask how to do something or how something works
6 participants
Converted from issue

This discussion was converted from issue #6125 on December 21, 2022 01:28.