mirror of
https://github.com/vwxyzjn/portwarden
synced 2025-12-28 04:43:14 +00:00
API-6 # Get user info also gets user's email address
This commit is contained in:
@@ -46,9 +46,9 @@ func (ps *PortwardenServer) GetGoogleDriveLoginHandler(c *gin.Context) {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error(), "message": ErrRetrievingOauthCode})
|
||||
return
|
||||
}
|
||||
tok, err := ps.GoogleDriveAppConfig.Exchange(ps.GoogleDriveContext, gdc.Code)
|
||||
tok, err := GoogleDriveAppConfig.Exchange(oauth2.NoContext, gdc.Code)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error(), "message": ErrRetrievingOauthCode})
|
||||
c.JSON(http.StatusUnauthorized, gin.H{"error": err.Error(), "message": "Login failure"})
|
||||
return
|
||||
}
|
||||
// pu := &PortwardenUser{GoogleToken: tok}
|
||||
|
||||
Reference in New Issue
Block a user