use original prompt default value to avoid a breaking change

Signed-off-by: Morgan Martinet <morgan@mmm-experts.com>
This commit is contained in:
Morgan Martinet
2021-07-14 17:01:38 -04:00
parent ac3ea828b1
commit 4036d634a0
2 changed files with 13 additions and 5 deletions
@@ -73,12 +73,16 @@ export class OidcAuthProvider implements OAuthHandlers {
async start(req: OAuthStartRequest): Promise<RedirectInfo> {
const { strategy } = await this.implementation;
return await executeRedirectStrategy(req, strategy, {
const options: Record<string, string> = {
accessType: 'offline',
prompt: this.prompt || '',
scope: req.scope || this.scope || 'openid profile email',
state: encodeState(req.state),
});
};
const prompt = this.prompt || 'none';
if (prompt !== 'auto') {
options.prompt = prompt;
}
return await executeRedirectStrategy(req, strategy, options);
}
async handler(