更新依赖项;调整新的目录结构
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import KeycloakProvider from "next-auth/providers/keycloak";
|
||||
import Avatar from "@assets/avatar/avatar-small.jpeg";
|
||||
|
||||
const authOptions = {
|
||||
// Configure one or more authentication providers
|
||||
providers: [
|
||||
// !!! Should be stored in .env file.
|
||||
KeycloakProvider({
|
||||
clientId: `tjwater`,
|
||||
clientSecret: `Darcm3gw0ZEJhIxt4DQUvacXpVlE7MBt`,
|
||||
issuer: `http://localhost:8088/realms/tjwater`,
|
||||
clientId: process.env.KEYCLOAK_CLIENT_ID!,
|
||||
clientSecret: process.env.KEYCLOAK_CLIENT_SECRET!,
|
||||
issuer: process.env.KEYCLOAK_ISSUER!,
|
||||
profile(profile) {
|
||||
return {
|
||||
id: profile.sub,
|
||||
name: profile.name ?? profile.preferred_username,
|
||||
email: profile.email,
|
||||
image: `https://faces-img.xcdn.link/thumb-lorem-face-6312_thumb.jpg`,
|
||||
image: Avatar.src,
|
||||
};
|
||||
},
|
||||
}),
|
||||
],
|
||||
secret: `Darcm3gw0ZEJhIxt4DQUvacXpVlE7MBt`,
|
||||
secret: process.env.NEXTAUTH_SECRET,
|
||||
};
|
||||
|
||||
export default authOptions;
|
||||
|
||||
Reference in New Issue
Block a user