File tree 4 files changed +55
-0
lines changed 4 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import IdentityServer4 from './identity-server4'
20
20
import LINE from './line'
21
21
import LinkedIn from './linkedin'
22
22
import MailRu from './mailru'
23
+ import Medium from './medium'
23
24
import Netlify from './netlify'
24
25
import Okta from './okta'
25
26
import Reddit from './reddit'
@@ -55,6 +56,7 @@ export default {
55
56
LINE ,
56
57
LinkedIn,
57
58
MailRu,
59
+ Medium,
58
60
Netlify,
59
61
Okta,
60
62
Reddit,
Original file line number Diff line number Diff line change
1
+ export default ( options ) => {
2
+ return {
3
+ id : 'medium' ,
4
+ name : 'Medium' ,
5
+ type : 'oauth' ,
6
+ version : '2.0' ,
7
+ scope : 'basicProfile' ,
8
+ params : { grant_type : 'authorization_code' } ,
9
+ accessTokenUrl : 'https://api.medium.com/v1/tokens' ,
10
+ authorizationUrl : 'https://medium.com/m/oauth/authorize?response_type=code' ,
11
+ profileUrl : 'https://api.medium.com/v1/me' ,
12
+ profile : ( profile ) => {
13
+ return {
14
+ id : profile . data . id ,
15
+ name : profile . data . name ,
16
+ email : null ,
17
+ image : profile . data . imageUrl
18
+ }
19
+ } ,
20
+ ...options
21
+ }
22
+ }
Original file line number Diff line number Diff line change
1
+ ---
2
+ id : medium
3
+ title : Medium
4
+ ---
5
+
6
+ ## Documentation
7
+
8
+ https://github.com/Medium/medium-api-docs
9
+
10
+ ## Configuration
11
+
12
+ https://medium.com/me/applications
13
+
14
+ ## Example
15
+
16
+ ``` js
17
+ import Providers from ` next-auth/providers`
18
+ ...
19
+ providers: [
20
+ Providers .Medium ({
21
+ clientId: process .env .MEDIUM_CLIENT_ID ,
22
+ clientSecret: process .env .MEDIUM_CLIENT_SECRET
23
+ })
24
+ }
25
+ ...
26
+ ```
27
+
28
+ ::: warning
29
+ Email address is not returned by the Medium API.
30
+ :::
Original file line number Diff line number Diff line change 21
21
"line" : " LINE" ,
22
22
"linkedin" : " LinkedIn" ,
23
23
"mailru" : " Mail.ru" ,
24
+ "medium" : " Medium" ,
24
25
"netlify" : " Netlify" ,
25
26
"okta" : " Okta" ,
26
27
"reddit" : " Reddit" ,
You can’t perform that action at this time.
0 commit comments