Skip to content

Commit

Permalink
feat: add prompt option to Discord strategy configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tomast1337 committed Jan 18, 2025
1 parent 5903cd0 commit 91c5574
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
IsArray,
IsBoolean,
IsEnum,
IsNumber,
IsOptional,
IsString,
Expand Down Expand Up @@ -49,6 +50,9 @@ export class DiscordStrategyConfig implements DiscordStrategyOptions {
@IsBoolean()
fetchScope?: boolean;

@IsEnum(['none', 'consent'])
prompt: 'consent' | 'none';

// The separator for the scope values.
@IsOptional()
@IsString()
Expand Down
1 change: 1 addition & 0 deletions server/src/auth/strategies/discord.strategy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class DiscordStrategy extends PassportStrategy(strategy, 'discord') {
callbackUrl: `${SERVER_URL}/api/v1/auth/discord/callback`,
scope: [DiscordPermissionScope.Email, DiscordPermissionScope.Identify],
fetchScope: true,
prompt: 'none',
};

super(config);
Expand Down

0 comments on commit 91c5574

Please sign in to comment.