mirror of
https://github.com/vwxyzjn/portwarden
synced 2025-12-23 02:53:12 +00:00
API-6 # Use Google API to get user info
This commit is contained in:
@@ -53,8 +53,8 @@ func (ps *PortwardenServer) GetGoogleDriveLoginHandler(c *gin.Context) {
|
||||
}
|
||||
spew.Dump(tok)
|
||||
GoogleDriveClient := ps.GoogleDriveAppConfig.Client(oauth2.NoContext, tok)
|
||||
fileBytes := []byte("xixix")
|
||||
err = UploadFile(fileBytes, GoogleDriveClient, tok)
|
||||
// fileBytes := []byte("xixix")
|
||||
err = GetUserInfo(GoogleDriveClient, tok)
|
||||
if err != nil {
|
||||
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error(), "message": ErrRetrievingOauthCode})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user