Open Darko opened 5 months ago
Hi
This adds an accessType
to the options
while calling redirect
. By default this is set to online
, which doesn't return a refresh token. You can set it to offline
to make it return one.
Ultimately,
await google.redirect({
options: {
...
+ accessType: "offline"
}
});
As a workaround, you can do
npm install git+https://github.com/subhendukundu/worker-auth-providers.git
to manually build the latest version from github.
Note that you will need yarn
and git
, although only for the build process.
First of all, great library! Think I've gone bald trying to figure out google auth from inside a worker.
2nd, when I perform the auth flow, google does not return a refresh_token alongside the id_token and the rest of the payload. How would I go about specifying that I want a refresh token to be returned?