File tree Expand file tree Collapse file tree 2 files changed +38
-20
lines changed Expand file tree Collapse file tree 2 files changed +38
-20
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import { OAuthConfig , OAuthUserConfig } from "."
2
+
3
+ export interface LineProfile {
4
+ iss : string ;
5
+ sub : string ;
6
+ aud : string ;
7
+ exp : number ;
8
+ iat : number ;
9
+ amr : string [ ] ;
10
+ name : string ;
11
+ picture : string ;
12
+ user : any ;
13
+ }
14
+
15
+ export default function LINE <
16
+ P extends Record < string , any > = LineProfile
17
+ > ( options : OAuthUserConfig < P > ) : OAuthConfig < P > {
18
+ return {
19
+ id : "line" ,
20
+ name : "LINE" ,
21
+ type : "oauth" ,
22
+ authorization : { params : { scope : "openid profile" } } ,
23
+ idToken : true ,
24
+ wellKnown : "https://access.line.me/.well-known/openid-configuration" ,
25
+ profile ( profile ) {
26
+ return {
27
+ id : profile . sub ,
28
+ name : profile . name ,
29
+ email : profile . email ,
30
+ image : profile . picture ,
31
+ }
32
+ } ,
33
+ client : {
34
+ id_token_signed_response_alg : "HS256" ,
35
+ } ,
36
+ options
37
+ }
38
+ }
You can’t perform that action at this time.
0 commit comments