mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
Getting vercel url
This commit is contained in:
parent
4559df9e8b
commit
1f5d92f081
1 changed files with 5 additions and 0 deletions
|
|
@ -15,6 +15,10 @@ const {
|
|||
|
||||
type OauthProvider = "google";
|
||||
|
||||
const baseUrl = process.env.VERCEL_URL
|
||||
? `https://${process.env.VERCEL_URL}`
|
||||
: "http://localhost:3000"; // Fallback for local development
|
||||
|
||||
// TODO: handle token expiration
|
||||
// https://next-auth.js.org/v3/tutorials/refresh-token-rotation
|
||||
// propertly set options too
|
||||
|
|
@ -42,6 +46,7 @@ export const AuthOptions: NextAuthOptions = {
|
|||
params: {
|
||||
scope: `https://${process.env.AZURE_AD_B2C_TENANT_NAME}.onmicrosoft.com/api/demo.read https://${process.env.AZURE_AD_B2C_TENANT_NAME}.onmicrosoft.com/api/demo.write offline_access openid`,
|
||||
prompt: "consent",
|
||||
redirect_uri: `${baseUrl}/api/auth/callback/azure-ad-b2c`,
|
||||
},
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue