@@ -9,31 +9,17 @@ export const TalentPulseOAuth = (options: OAuthUserConfig<Record<string, any>>):
9
9
version : '2.0' ,
10
10
idToken : false ,
11
11
authorization : {
12
- url : "http://localhost:3004/auth/methods/oauth/authorize" ,
13
- // url: "https://api.talentpulse.localhost/auth/methods/oauth/authorize",
12
+ url : process . env . BACKEND_OAUTH_AUTHORIZATION_URL ,
14
13
params : {
15
14
scope : null
16
15
} ,
17
16
} ,
18
- // token: "https://api.talentpulse.localhost/auth/methods/oauth/token",
19
- token : "http://localhost:3004/auth/methods/oauth/token" ,
20
- // userinfo: "https://api.talentpulse.localhost/auth/current-user",
21
- userinfo : "https://localhost:3004/auth/current-user" ,
22
- // token: {
23
- // url: "https://api.talentpulse.localhost/auth/methods/oauth/token",
24
- // async request(context) {
25
- // console.log('#####')
26
- // console.log(context)
27
- // console.log('#####')
28
- // // const tokens = await fetch(contex)
29
- // return { }
30
- // }
31
- // },
17
+ token : process . env . BACKEND_OAUTH_TOKEN_URL ,
18
+ userinfo : process . env . BACKEND_OAUTH_USER_INFO_URL ,
32
19
profile ( profile ) {
33
20
return {
34
- id : profile . data . id ,
35
- first_name : profile . data . first_name ,
36
- last_name : profile . data . last_name ,
21
+ id : profile . data . uuid ,
22
+ name : profile . data . first_name + ' ' + profile . data . last_name ,
37
23
email : profile . data . email ,
38
24
}
39
25
} ,
0 commit comments