-
Notifications
You must be signed in to change notification settings - Fork 141
/
Copy pathpassport.js
93 lines (83 loc) · 2.1 KB
/
passport.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/**
* Passport configuration
*
* This is the configuration for your Passport.js setup and it where you'd
* define the authentication strategies you want your application to employ.
*
* Authentication scopes can be set through the `scope` property.
*
* For more information on the available providers, check out:
* http://passportjs.org/guide/providers/
*/
module.exports.passport = {
local: {
strategy: require('passport-local').Strategy
},
basic: {
strategy: require('passport-http').BasicStrategy,
protocol: 'basic'
},
/*
bearer: {
strategy: require('passport-http-bearer').Strategy,
protocol: 'bearer'
},
google: {
name: 'Google',
protocol: 'oauth2',
strategy: require('passport-google-oauth').OAuth2Strategy,
options: {
clientID: 'your-client-id',
clientSecret: 'your-client-secret',
scope: ['profile', 'email']
}
}
twitter: {
name: 'Twitter',
protocol: 'oauth',
strategy: require('passport-twitter').Strategy,
options: {
consumerKey: 'your-consumer-key',
consumerSecret: 'your-consumer-secret'
}
},
github: {
name: 'GitHub',
protocol: 'oauth2',
strategy: require('passport-github').Strategy,
options: {
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
}
},
facebook: {
name: 'Facebook',
protocol: 'oauth2',
strategy: require('passport-facebook').Strategy,
options: {
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
}
}
youtube: {
name: 'Youtube',
protocol: 'oauth2',
strategy: require('passport-youtube').Strategy,
options: {
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
},
},
'youtube-v3': {
name: 'Youtube',
protocol: 'oauth2',
strategy: require('passport-youtube-v3').Strategy,
options: {
clientID: 'your-client-id',
clientSecret: 'your-client-secret'
// Scope: see https://developers.google.com/youtube/v3/guides/authentication
scope: [ 'https://www.googleapis.com/auth/youtube.readonly' ],
},
},
*/
};