[#335] added Discord OAuth2 provider

This commit is contained in:
Gani Georgiev
2022-08-21 19:38:42 +03:00
parent 0b8c7f6883
commit 49b084cf50
18 changed files with 246 additions and 149 deletions
+3
View File
@@ -52,6 +52,7 @@ func TestSettingsList(t *testing.T) {
`"facebookAuth":{`,
`"githubAuth":{`,
`"gitlabAuth":{`,
`"discordAuth":{`,
`"secret":"******"`,
`"clientSecret":"******"`,
},
@@ -114,6 +115,7 @@ func TestSettingsSet(t *testing.T) {
`"facebookAuth":{`,
`"githubAuth":{`,
`"gitlabAuth":{`,
`"discordAuth":{`,
`"secret":"******"`,
`"clientSecret":"******"`,
`"appName":"Acme"`,
@@ -166,6 +168,7 @@ func TestSettingsSet(t *testing.T) {
`"facebookAuth":{`,
`"githubAuth":{`,
`"gitlabAuth":{`,
`"discordAuth":{`,
`"secret":"******"`,
`"clientSecret":"******"`,
`"appName":"update_test"`,
+1 -1
View File
@@ -129,7 +129,7 @@ func (api *userApi) authMethods(c echo.Context) error {
}
state := security.RandomString(30)
codeVerifier := security.RandomString(30)
codeVerifier := security.RandomString(43)
codeChallenge := security.S256Challenge(codeVerifier)
codeChallengeMethod := "S256"
result.AuthProviders = append(result.AuthProviders, providerInfo{