Using authorization_endpoint with oidc Passport Strategy #576
-
Hello, I have the following client configured (simplified for sharing): const clientMetaData: ClientMetadata = {
client_id: '...',
client_secret: '...',
};
const issuerMetaData: IssuerMetaData = {
issuer: '...',
authorization_endpoint: '...',
registration_endpoint: '...',
token_endpoint: ...',
userinfo_endpoint: ...',
jwks_uri: ...',
};
const params: AuthorizationParameters = {
scope: '...',
response_type: '...',
redirect_uri: '...',
};
const { Client } = new Issuer(issuerMetaData);
const client = new Client(clientMetaData);
const options: StrategyOptions = {
client,
params,
};
passport.use('oidc', new Strategy(options, verify));
// passport.serializeUser and deserializeUser configured also
authRouter.get('/authenticate', passport.authenticate('oidc'));
authRouter.get('/register', /** ??? */);
authRouter.get('/callback', passport.authenticate('oidc'), callbackHandler); My login authentication flow works as expected as passport is handling PKCE stuff for me. Do you know is there a way to call a passport method that will invoke the At the moment I am manually generating the registration url with required query params (code_challenge, code_challenge_method etc) but the callback is failing as I think I'm missing steps that passport otherwise handles in the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't think you're clear what the registration functionality is for. It's not for end users, but for dynamically registering clients. |
Beta Was this translation helpful? Give feedback.
I don't think you're clear what the registration functionality is for. It's not for end users, but for dynamically registering clients.