Skip to content

Commit

Permalink
feat: add discord login provider
Browse files Browse the repository at this point in the history
  • Loading branch information
its-felix committed Nov 13, 2024
1 parent 2d876d3 commit 9e43e59
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.gw2auth</groupId>
<artifactId>oauth2-server</artifactId>
<version>1.89.0</version>
<version>1.90.0</version>
<packaging>jar</packaging>

<parent>
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/application-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ spring:
client-secret: ${GOOGLE_CLIENT_SECRET}
scope: "id"
redirect-uri: "{baseUrl}/auth/oauth2/code/google"
discord:
provider: gw2auth
client-name: "Discord"
client-id: ${DISCORD_CLIENT_ID}
client-secret: ${DISCORD_CLIENT_SECRET}
scope: "id"
redirect-uri: "{baseUrl}/auth/oauth2/code/discord"
provider:
gw2auth:
issuer-uri: "https://gw2auth.com"
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ spring:
client-secret: ${GOOGLE_CLIENT_SECRET}
scope: "openid"
redirect-uri: "{baseUrl}/auth/oauth2/code/google"
discord:
provider: discord
client-name: "Discord"
client-id: ${DISCORD_CLIENT_ID}
client-secret: ${DISCORD_CLIENT_SECRET}
authorization-grant-type: "authorization_code"
scope: "identify"
redirect-uri: "{baseUrl}/auth/oauth2/code/discord"
provider:
cognito:
issuer-uri: "https://cognito-idp.${AMZ_COGNITO_REGION}.amazonaws.com/${AMZ_COGNITO_POOL_ID}"
Expand All @@ -54,6 +62,11 @@ spring:
user-name-attribute: id
google:
user-name-attribute: sub
discord:
authorization-uri: "https://discord.com/oauth2/authorize"
token-uri: "https://discord.com/api/oauth2/token"
user-info-uri: "https://discord.com/api/users/@me"
user-name-attribute: id

management:
endpoints:
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/application-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ spring:
client-secret: ${GOOGLE_CLIENT_SECRET}
scope: "id"
redirect-uri: "{baseUrl}/auth/oauth2/code/google"
discord:
provider: gw2auth
client-name: "Discord"
client-id: ${DISCORD_CLIENT_ID}
client-secret: ${DISCORD_CLIENT_SECRET}
scope: "id"
redirect-uri: "{baseUrl}/auth/oauth2/code/discord"
provider:
gw2auth:
issuer-uri: "https://gw2auth.com"
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/example.application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ spring:
client-secret: ${GW2AUTH_LOGIN_PROVIDER_CLIENT_SECRET}
scope: "id"
redirect-uri: "{baseUrl}/auth/oauth2/code/google"
discord:
provider: gw2auth
client-name: "Discord"
client-id: ${GW2AUTH_LOGIN_PROVIDER_CLIENT_ID}
client-secret: ${GW2AUTH_LOGIN_PROVIDER_CLIENT_SECRET}
scope: "id"
redirect-uri: "{baseUrl}/auth/oauth2/code/discord"
provider:
gw2auth:
issuer-uri: "https://gw2auth.com"
Expand Down

0 comments on commit 9e43e59

Please sign in to comment.