Compare commits

...

3 Commits

Author SHA1 Message Date
Lakhan Samani
bbc6394cf3 Merge pull request #286 from Pjort/main
fixed validation of refresh token
2022-11-03 20:10:40 +05:30
Pjort Kat
63c8e2e55f fixed validation of refresh token 2022-11-03 11:51:59 +01:00
Lakhan Samani
b224892a39 fix: minor space 2022-11-02 08:48:56 +05:30
2 changed files with 2 additions and 1 deletions

View File

@@ -26,7 +26,6 @@ func NewProvider() (*provider, error) {
config := aws.Config{ config := aws.Config{
MaxRetries: aws.Int(3), MaxRetries: aws.Int(3),
CredentialsChainVerboseErrors: aws.Bool(true), // for full error logs CredentialsChainVerboseErrors: aws.Bool(true), // for full error logs
} }
if awsRegion != "" { if awsRegion != "" {

View File

@@ -154,6 +154,7 @@ func TokenHandler() gin.HandlerFunc {
"error": "invalid_refresh_token", "error": "invalid_refresh_token",
"error_description": "The refresh token is invalid", "error_description": "The refresh token is invalid",
}) })
return
} }
claims, err := token.ValidateRefreshToken(gc, refreshToken) claims, err := token.ValidateRefreshToken(gc, refreshToken)
@@ -163,6 +164,7 @@ func TokenHandler() gin.HandlerFunc {
"error": "unauthorized", "error": "unauthorized",
"error_description": err.Error(), "error_description": err.Error(),
}) })
return
} }
userID = claims["sub"].(string) userID = claims["sub"].(string)
loginMethod := claims["login_method"] loginMethod := claims["login_method"]