Is it possible to use a custom callbackUrl for OpenID Request? #4264
Unanswered
christoph-bittmann
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Question 💬
Hi there!
The redirect_uri parameter, which is part of request header, follows by default the pattern [BASE_URL]/api/auth/signin/[PROVIDER_ID] . Is there an option to define an custom redirect_uri for the authorization request.
( I don't wan't to know how to define a custom callBackURL ... ).
An simular question was asked here: #591 (comment), maybe this help to understand the context :)
How to reproduce ☕️
// [...nextauth].ts
`import NextAuth from "next-auth"
import { OAuthConfig } from "next-auth/providers"
const providerConfig: OAuthConfig & {
callbackUrl?: string
} = {
id: "spch",
name: "SP",
type: "oauth",
version: "2.0",
wellKnown:
"https://[...]/.well-known/openid-configuration",
callbackUrl: "http://localhost:4200/oauth2/callback",
authorization: {
params: {
scope: "openid customer ACR_Level_10 ACR_Level_20 ACR_Level_30",
redirect_uri: "http://localhost:4200/oauth2/callback",
clientId: "...",
codeChallengeMethod: "S256",
},
},
clientId: "swisspass_ch_entw",
idToken: true,
profile(profile) {
return {
id: profile.id,
name: profile.givenname,
email: profile.authenEmail,
}
},
}
export default NextAuth({
providers: [providerConfig],
callbacks: {
},
debug: true,
})`
Contributing 🙌🏽
Yes, I am willing to help answer this question in a PR
Beta Was this translation helpful? Give feedback.
All reactions