feat(oauth-providers): Allow for refresh tokens to be used via access_type "offline" in Issue/#619
I might need some support here as I wasn't able to figure out the most efficient way to test my changes based on how this all works within a worker? Any shove in the right direction would be greatly appreciated for proper testing.
I also don't really understand why it had my other pull requests in the commit logs... No changes for those files are actually in this pull request
Closes #619
Hi @aaronware
Thanks for the PR. I think it would be fine if you tested it with the npm link though we should add more test codes.
@monoald Do you have any thoughts on this?
Thanks @yusukebe , I got pulled away from this onto some items but I should have some time over the next week to confirm it's all working properly within the worker. @yusukebe I'll keep an eye out for any recommendations/changes you or @monoald have and adjust the PR as needed
Hi! We are also interested in this behaviour to configure long-running sessions (eg. polling GMail on behalf of a user). Right now the flow does not expose the refresh token (although it is received), but could very easily when correctly configured with prompt: "consent" and access_type: "offline".
It is hard to monkey patch at this time as this is internal to AuthFlow. I don't know if this PR is still under consideration or if I should open a new one to cover this use case.
Hi @Titou325
This PR is not progressing, so creating a new PR is okay. If so, I will review it. It would be better if you added proper tests there.
agreed, it'd be nice if we had support for google refresh tokens
Hi @aaronware
Can you still work on this PR? I think this feature is okay, but I want to do two things:
- Writing tests
- Update README.md
If these are done, I'll review them!
@yusukebe I can pick this up again in the next week or so
🦋 Changeset detected
Latest commit: 4c89a8c1e1d21e7180b0dc314ecda787280e1ec6
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Hi! I'm autofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests.
I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
- Allow edits by maintainers for your pull request, and then re-trigger CI (for example by pushing a new commit).
- Manually fix the issues identified for your pull request (see the GitHub Actions output for details on what I would like to change).
Codecov Report
:x: Patch coverage is 25.00000% with 15 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 82.29%. Comparing base (c97d834) to head (4c89a8c).
:warning: Report is 5 commits behind head on main.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...s/oauth-providers/src/providers/google/authFlow.ts | 25.00% | 11 Missing and 4 partials :warning: |
:x: Your patch check has failed because the patch coverage (25.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.
Additional details and impacted files
@@ Coverage Diff @@
## main #634 +/- ##
==========================================
- Coverage 83.41% 82.29% -1.12%
==========================================
Files 102 103 +1
Lines 3352 3401 +49
Branches 867 883 +16
==========================================
+ Hits 2796 2799 +3
- Misses 466 500 +34
- Partials 90 102 +12
| Flag | Coverage Δ | |
|---|---|---|
| oauth-providers | 20.16% <25.00%> (-0.07%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.