Skip to content

Commit

Permalink
fix: use lowered id to get third party provider (#2017)
Browse files Browse the repository at this point in the history
* fix: use lowered id to get third party provider

* test: fix test

* test: increase db max lifetime
  • Loading branch information
FreddyDevelop authored Jan 6, 2025
1 parent fbc4451 commit fc80743
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/handler/thirdparty_auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (s *thirdPartySuite) TestThirdPartyHandler_Auth() {
requestedRedirectTo: "https://app.test.example",
expectedBaseURL: "https://login.test.example",
expectedError: thirdparty.ErrorCodeInvalidRequest,
expectedErrorDescription: "unknownProvider",
expectedErrorDescription: "unknown provider",
},
{
name: "error redirect when requesting a redirectTo that is not allowed",
Expand Down
2 changes: 1 addition & 1 deletion backend/test/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func StartDB(name string, dialect string) (*TestDB, error) {
hostAndPort := resource.GetHostPort(getPortID(dialect))
dsn := getDsn(dialect, hostAndPort)

_ = resource.Expire(120)
_ = resource.Expire(300)

pool.MaxWait = 120 * time.Second
if err = pool.Retry(func() error {
Expand Down
2 changes: 1 addition & 1 deletion backend/thirdparty/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func GetProvider(config config.ThirdParty, id string) (OAuthProvider, error) {
if strings.HasPrefix(idLower, "custom_") {
return getCustomThirdPartyProvider(config, idLower)
} else {
return getThirdPartyProvider(config, id)
return getThirdPartyProvider(config, idLower)
}
}

Expand Down

0 comments on commit fc80743

Please sign in to comment.