We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fd22ea commit f25826cCopy full SHA for f25826c
src/lib/auth.ts
@@ -1,5 +1,5 @@
1
import { betterAuth } from 'better-auth';
2
-import { admin } from 'better-auth/plugins';
+import { admin, oAuthProxy } from 'better-auth/plugins';
3
import { D1Dialect } from 'kysely-d1';
4
5
export const auth = (url: string, env: Env) => {
@@ -13,11 +13,18 @@ export const auth = (url: string, env: Env) => {
13
rateLimit: {
14
enabled: true,
15
},
16
- plugins: [admin()],
+ plugins: [
17
+ oAuthProxy({
18
+ productionURL: 'https://astro-tips.dev',
19
+ currentURL: url,
20
+ }),
21
+ admin(),
22
+ ],
23
socialProviders: {
24
github: {
25
clientId: env.GITHUB_CLIENT_ID,
26
clientSecret: env.GITHUB_CLIENT_SECRET,
27
+ redirectURI: `https://my-main-app.com/api/auth/callback/github`,
28
29
30
});
0 commit comments