File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed
src/AspNet.Security.OAuth.Lichess
test/AspNet.Security.OAuth.Providers.Tests/Lichess Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public static class LichessAuthenticationDefaults
42
42
/// <summary>
43
43
/// Default value for <see cref="OAuthOptions.TokenEndpoint"/>.
44
44
/// </summary>
45
- public const string TokenEndpoint = "https://oauth. lichess.org/oauth " ;
45
+ public const string TokenEndpoint = "https://lichess.org/api/token " ;
46
46
47
47
/// <summary>
48
48
/// Default value for <see cref="OAuthOptions.UserInformationEndpoint"/>.
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ public class LichessAuthenticationOptions : OAuthOptions
17
17
{
18
18
public LichessAuthenticationOptions ( )
19
19
{
20
+ // Pkce is now mandatory for LiChess
21
+ UsePkce = true ;
22
+
20
23
ClaimsIssuer = LichessAuthenticationDefaults . Issuer ;
21
24
CallbackPath = LichessAuthenticationDefaults . CallbackPath ;
22
25
Original file line number Diff line number Diff line change 4
4
{
5
5
"comment" : " https://lichess.org/api#section/Authentication" ,
6
6
"uri" : " https://oauth.lichess.org/oauth" ,
7
+ "method" : " GET"
8
+ },
9
+ {
10
+ "comment" : " https://lichess.org/api#tag/OAuth" ,
11
+ "uri" : " https://lichess.org/api/token" ,
7
12
"method" : " POST" ,
8
13
"contentFormat" : " json" ,
9
14
"contentJson" : {
15
+ "token_type" : " Bearer" ,
10
16
"access_token" : " secret-access-token" ,
11
- "token_type" : " bearer" ,
12
- "refresh_token" : " secret-refresh-token" ,
13
- "expires_in" : " 600"
17
+ "expires_in" : 31536000
14
18
}
15
19
},
16
20
{
You can’t perform that action at this time.
0 commit comments