mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-30 12:55:02 +00:00
final test
This commit is contained in:
parent
10952d2874
commit
31a1bf77a8
2 changed files with 2 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import NextAuth, { NextAuthOptions } from "next-auth";
|
||||
import GoogleProvider from "next-auth/providers/google";
|
||||
import AzureADB2CProvider from "next-auth/providers/azure-ad-b2c";
|
||||
import AzureADProvider from "next-auth/providers/azure-ad";
|
||||
|
||||
import { db } from "@/app/db/db";
|
||||
import { user as userTable, User } from "@/app/db/schema/users";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
|
@ -12,9 +12,6 @@ const {
|
|||
AZURE_AD_B2C_CLIENT_ID = "",
|
||||
AZURE_AD_B2C_CLIENT_SECRET = "",
|
||||
AZURE_AD_B2C_PRIMARY_USER_FLOW = "",
|
||||
AZURE_AD_CLIENT_ID = "",
|
||||
AZURE_AD_CLIENT_SECRET = "",
|
||||
AZURE_AD_TENANT_ID = "",
|
||||
} = process.env;
|
||||
|
||||
type OauthProvider = "google";
|
||||
|
|
@ -49,17 +46,6 @@ export const AuthOptions: NextAuthOptions = {
|
|||
},
|
||||
},
|
||||
}),
|
||||
AzureADProvider({
|
||||
clientId: AZURE_AD_CLIENT_ID,
|
||||
clientSecret: AZURE_AD_CLIENT_SECRET,
|
||||
tenantId: AZURE_AD_TENANT_ID,
|
||||
authorization: {
|
||||
params: {
|
||||
scope: "openid profile email",
|
||||
prompt: "login",
|
||||
},
|
||||
},
|
||||
}),
|
||||
],
|
||||
pages: {
|
||||
signIn: "/",
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ 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", { 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
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue