-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal Logs: Receiving "Request had insufficient authentication scopes" When Attempting to Export to Google Calendar #72
Comments
While testing, I was able to confirm that after reconnecting the Google Account, I do not experience this issue. That being said, before I reconnected the account, I did attempt to add more scopes to the |
Troubleshooting this again this morning. I have confirmed that the credentials we pull from the DB have expired and do contain a refresh token to be able to refresh the user credentials. I have also confirmed that the following scopes are associated with the credentials which are the scopes that are requested by the gCalIntegratinator. During my testing, I was able to reproduce this behavior and I feel that I have a decent understanding of what is occurring. This is really only an issue if the user has deleted the Secondary Google Calendar we created prior to exporting. If the user does not delete the calendar, then we can add events to it as expected. The execution flow that brought us to the error is as follows:
During this troubleshooting, I can see that the credentials have the necessary scopes attached to them all the way up until the At this time, I am unsure as to why reconnecting the Google Calendar Account and generating a new Secondary Calendar does not run into this issue. I will be exploring these items more below. |
Did some more troubleshooting and found that when reconnecting a Google Account and following the above steps, I am unable to recreate this issue. However, after reconnecting the Google Account and stepping through the code, I was able to find the following scopes set to the service that was used to create the Secondary Google Calendar: These differ that what was associated with the user's credentials from what I could tell, however I was not able to check what the scopes for the service are while the issue is still occurring. As such, I will need to check this again after the credentials have expired to see if there is a difference. If there is a difference, then it seems that something might be taking place either in the storing of the credentials in the DB, or in the creation of the service via the Generally speaking, it appears we would only run into this if an upper staff member for a given hall removes the Google Calendar we create from their calendarList. In these instances, it is possible for us to simply have the Hall Director reconnect the Google Account and we can rebuild the calendar, however this does feel like an inelegant solution and I would much prefer to try to recreate the calendar for ourselves with no user intervention. |
After waiting for the token to expire and testing again, I am able to reproduce the behavior once more. This time, I checked the authentication scopes associated with services that are built by the |
After waiting for the token to expire and testing again, I am able to reproduce the behavior once more. This time, I checked the authentication scopes associated with services that are built by the I have created a question on Stack Overflow here to ask for some community assistance. Otherwise another step might be to reach out to Google with this issue. |
Describe the bug
When attempting to export a schedule to Google Calendar after a period of time has past since authorizing RADSA, the UI will indicate that the application is working, however nothing will happen. Looking at the logs, the following error appears:
To Reproduce
Expected behavior
When RADSA requests permissions to access a user's calendar, we request offline access which should allow us to refresh the token if it expires without re-prompting the user. The desired behavior is to have the user authorize once and let us re-authorize when needed.
Desktop (please complete the following information):
Additional context
The branch I am on does bump Cryptography from 3.0 to 3.2, however I have noticed this behavior without this bump. At the time, I assumed the issue was due to a legacy token as I had just corrected a spelling error when requesting the user access.
The text was updated successfully, but these errors were encountered: