-
Notifications
You must be signed in to change notification settings - Fork 73
Description
As part of the Auth()'s returned gin.HandlerFunc, the user is saved to the context and session. This is great for identification, however I'm running into an issue. During the google package's Setup(), my application is able to specify scopes to make subsequent requests on behalf of the user. The problem is that our token, which was issued with those scopes, is no longer available. To get a token this would require an additional or custom middleware be implemented. Since we are providing a means to specify scopes, I think its presumable that the application should be able to make requests on the user's behalf following authentication. With that, I was interested in modifying the Auth() function to save the token to the session and the context.
If I'm misunderstanding the flow or overlooking a way to not have to reinitiate the oauth2 flow, please let me know. I'm going to work up an MR in the mean time. Thanks!