mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
temp test
This commit is contained in:
parent
1d0fab8ec5
commit
345cfc670a
2 changed files with 17 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import AzureADB2CProvider from "next-auth/providers/azure-ad-b2c";
|
|||
import { db } from "@/app/db/db";
|
||||
import { user as userTable, User } from "@/app/db/schema/users";
|
||||
import { eq } from "drizzle-orm";
|
||||
import AzureADProvider from "next-auth/providers/azure-ad";
|
||||
|
||||
const { GOOGLE_CLIENT_ID = "", GOOGLE_CLIENT_SECRET = "" } = process.env;
|
||||
const {
|
||||
|
|
@ -11,6 +12,9 @@ const {
|
|||
AZURE_AD_B2C_CLIENT_ID = "",
|
||||
AZURE_AD_B2C_CLIENT_SECRET = "",
|
||||
AZURE_AD_B2C_PRIMARY_USER_FLOW = "",
|
||||
AZURE_AD_B2B_CLIENT_ID = "",
|
||||
AZURE_AD_B2B_CLIENT_SECRET = "",
|
||||
AZURE_AD_B2B_TENANT_ID = "",
|
||||
} = process.env;
|
||||
|
||||
type OauthProvider = "google";
|
||||
|
|
@ -45,6 +49,17 @@ export const AuthOptions: NextAuthOptions = {
|
|||
},
|
||||
},
|
||||
}),
|
||||
AzureADProvider({
|
||||
clientId: AZURE_AD_B2B_CLIENT_ID,
|
||||
clientSecret: AZURE_AD_B2B_CLIENT_SECRET,
|
||||
tenantId: AZURE_AD_B2B_TENANT_ID,
|
||||
authorization: {
|
||||
params: {
|
||||
scope: "openid profile email",
|
||||
prompt: "login",
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
pages: {
|
||||
signIn: "/",
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ const MicrosoftSignInButton = () => {
|
|||
<Button
|
||||
data-testid="microsoft-signin-btn"
|
||||
className="text-black hover:text-gray-400 text-xl hover:bg-gray-100 rounded-lg p-0"
|
||||
onClick={() => signIn("azure-ad-b2c", { callbackUrl })} // Note the provider ID "azure-ad" must match the one you've set in NextAuth config
|
||||
// onClick={() => signIn("azure-ad-b2c", { callbackUrl })} // Note the provider ID "azure-ad" must match the one you've set in NextAuth config
|
||||
onClick={() => signIn("azure-ad", { callbackUrl })} // Note the provider ID "azure-ad" must match the one you've set in NextAuth config
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue