Skip to content

Commit

Permalink
fix: Add Google OAuth Access type (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
342b45 authored Jul 26, 2023
1 parent 9ddead4 commit 509fe87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .auri/$3qv9gdxj.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
package: "@lucia-auth/oauth" # package name
type: "minor" # "major", "minor", "patch"
---

Add Google OAuth Access type
2 changes: 2 additions & 0 deletions packages/oauth/src/providers/google.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import type { OAuthConfig, OAuthProvider } from "../core.js";

type Config = OAuthConfig & {
redirectUri: string;
accessType?: "online" | "offline";
};

const PROVIDER_ID = "google";
Expand Down Expand Up @@ -58,6 +59,7 @@ export const google = <_Auth extends Auth>(auth: _Auth, config: Config) => {
config.scope
),
response_type: "code",
access_type: config.accessType ?? "online",
state
});
return [url, state] as const;
Expand Down

0 comments on commit 509fe87

Please sign in to comment.