generated from traefik/plugindemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
providers.go
604 lines (599 loc) · 23.7 KB
/
providers.go
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
package traefikgothauth
import (
"fmt"
"github.com/markbates/goth"
"github.com/markbates/goth/providers/amazon"
"github.com/markbates/goth/providers/auth0"
"github.com/markbates/goth/providers/azuread"
"github.com/markbates/goth/providers/battlenet"
"github.com/markbates/goth/providers/bitbucket"
"github.com/markbates/goth/providers/box"
"github.com/markbates/goth/providers/dailymotion"
"github.com/markbates/goth/providers/deezer"
"github.com/markbates/goth/providers/digitalocean"
"github.com/markbates/goth/providers/discord"
"github.com/markbates/goth/providers/dropbox"
"github.com/markbates/goth/providers/eveonline"
"github.com/markbates/goth/providers/facebook"
"github.com/markbates/goth/providers/fitbit"
"github.com/markbates/goth/providers/gitea"
"github.com/markbates/goth/providers/github"
"github.com/markbates/goth/providers/gitlab"
"github.com/markbates/goth/providers/gplus"
"github.com/markbates/goth/providers/heroku"
"github.com/markbates/goth/providers/instagram"
"github.com/markbates/goth/providers/intercom"
"github.com/markbates/goth/providers/kakao"
"github.com/markbates/goth/providers/lastfm"
"github.com/markbates/goth/providers/line"
"github.com/markbates/goth/providers/linkedin"
"github.com/markbates/goth/providers/mastodon"
"github.com/markbates/goth/providers/meetup"
"github.com/markbates/goth/providers/microsoftonline"
"github.com/markbates/goth/providers/naver"
"github.com/markbates/goth/providers/nextcloud"
"github.com/markbates/goth/providers/okta"
"github.com/markbates/goth/providers/onedrive"
"github.com/markbates/goth/providers/openidConnect"
"github.com/markbates/goth/providers/patreon"
"github.com/markbates/goth/providers/paypal"
"github.com/markbates/goth/providers/salesforce"
"github.com/markbates/goth/providers/seatalk"
"github.com/markbates/goth/providers/shopify"
"github.com/markbates/goth/providers/slack"
"github.com/markbates/goth/providers/soundcloud"
"github.com/markbates/goth/providers/spotify"
"github.com/markbates/goth/providers/steam"
"github.com/markbates/goth/providers/strava"
"github.com/markbates/goth/providers/stripe"
"github.com/markbates/goth/providers/tiktok"
"github.com/markbates/goth/providers/twitch"
"github.com/markbates/goth/providers/twitter"
"github.com/markbates/goth/providers/twitterv2"
"github.com/markbates/goth/providers/uber"
"github.com/markbates/goth/providers/vk"
"github.com/markbates/goth/providers/wecom"
"github.com/markbates/goth/providers/wepay"
"github.com/markbates/goth/providers/xero"
"github.com/markbates/goth/providers/yahoo"
"github.com/markbates/goth/providers/yammer"
"github.com/markbates/goth/providers/yandex"
"github.com/markbates/goth/providers/zoom"
)
// NewProvider creates a New provider based on the given Name and parameters.
func NewProvider(name, clientclientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
p, ok := getProviderInfo(name)
if !ok {
return nil, fmt.Errorf("provider %s not found", name)
}
return p.New(clientclientKey, secret, callback, custom, scopes...)
}
func getProviderInfo(name string) (*ProviderInfo, bool) {
for _, p := range allProviders {
if p.Name == name {
return p, true
}
}
return nil, false
}
// ProviderInfo contains static metadata for a provider.
type ProviderInfo struct {
Name, DisplayName, Icon string
New func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error)
}
// allProviders is a list of static metadata for all supported providers.
//
// Based on https://github.com/markbates/goth/blob/master/examples/main.go
var allProviders = []*ProviderInfo{
{
Name: "amazon",
DisplayName: "Amazon",
Icon: "https://icons.duckduckgo.com/ip3/amazon.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return amazon.New(clientKey, secret, callback, scopes...), nil
},
},
//{ // Incompatible with yaegi (for now...)
// Name: "apple",
// DisplayName: "Apple",
// Icon: "https://icons.duckduckgo.com/ip3/apple.com.ico",
// New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
// client, ok := custom["client"].(*http.Client)
// if !ok {
// client = http.DefaultClient
// }
// return apple.New(clientKey, secret, callback, client, scopes...), nil
// },
//},
{
Name: "auth0",
DisplayName: "Auth0",
Icon: "https://icons.duckduckgo.com/ip3/auth0.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return auth0.New(clientKey, secret, callback, custom["domain"].(string), scopes...), nil
},
},
{
Name: "azuread",
DisplayName: "Azure AD",
Icon: "https://icons.duckduckgo.com/ip3/azure.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
resources, ok := custom["resources"].([]string)
if !ok {
resources = []string{}
}
return azuread.New(clientKey, secret, callback, resources, scopes...), nil
},
},
{
Name: "battlenet",
DisplayName: "Battle.net",
Icon: "https://icons.duckduckgo.com/ip3/battle.net.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return battlenet.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "bitbucket",
DisplayName: "Bitbucket",
Icon: "https://icons.duckduckgo.com/ip3/bitbucket.org.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return bitbucket.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "box",
DisplayName: "Box",
Icon: "https://icons.duckduckgo.com/ip3/box.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return box.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "dailymotion",
DisplayName: "Dailymotion",
Icon: "https://icons.duckduckgo.com/ip3/dailymotion.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return dailymotion.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "deezer",
DisplayName: "Deezer",
Icon: "https://icons.duckduckgo.com/ip3/deezer.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return deezer.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "digitalocean",
DisplayName: "DigitalOcean",
Icon: "https://icons.duckduckgo.com/ip3/digitalocean.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return digitalocean.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "discord",
DisplayName: "Discord",
Icon: "https://icons.duckduckgo.com/ip3/discord.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return discord.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "dropbox",
DisplayName: "Dropbox",
Icon: "https://icons.duckduckgo.com/ip3/dropbox.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return dropbox.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "eveonline",
DisplayName: "EVE Online",
Icon: "https://icons.duckduckgo.com/ip3/eveonline.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return eveonline.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "facebook",
DisplayName: "Facebook",
Icon: "https://icons.duckduckgo.com/ip3/facebook.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return facebook.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "fitbit",
DisplayName: "Fitbit",
Icon: "https://icons.duckduckgo.com/ip3/fitbit.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return fitbit.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "gitea",
DisplayName: "Gitea",
Icon: "https://icons.duckduckgo.com/ip3/gitea.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return gitea.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "github",
DisplayName: "GitHub",
Icon: "https://icons.duckduckgo.com/ip3/github.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return github.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "gitlab",
DisplayName: "GitLab",
Icon: "https://icons.duckduckgo.com/ip3/gitlab.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return gitlab.New(clientKey, secret, callback, scopes...), nil
},
},
//{ // Incompatible with yaegi (for now...)
// Name: "google",
// DisplayName: "Google",
// Icon: "https://icons.duckduckgo.com/ip3/google.com.ico",
// New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
// scopes, ok := custom["scopes"].([]string)
// if !ok {
// scopes = []string{}
// }
// return google.New(clientKey, secret, callback, scopes...), nil
// },
//},
{
Name: "gplus",
DisplayName: "Google Plus",
Icon: "https://icons.duckduckgo.com/ip3/google.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return gplus.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "heroku",
DisplayName: "Heroku",
Icon: "https://icons.duckduckgo.com/ip3/heroku.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return heroku.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "instagram",
DisplayName: "Instagram",
Icon: "https://icons.duckduckgo.com/ip3/instagram.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return instagram.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "intercom",
DisplayName: "Intercom",
Icon: "https://icons.duckduckgo.com/ip3/intercom.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return intercom.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "kakao",
DisplayName: "Kakao",
Icon: "https://icons.duckduckgo.com/ip3/kakao.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return kakao.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "lastfm",
DisplayName: "Last.fm",
Icon: "https://icons.duckduckgo.com/ip3/last.fm.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return lastfm.New(clientKey, secret, callback), nil
},
},
{
Name: "line",
DisplayName: "Line",
Icon: "https://icons.duckduckgo.com/ip3/line.me.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return line.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "linkedin",
DisplayName: "LinkedIn",
Icon: "https://icons.duckduckgo.com/ip3/linkedin.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return linkedin.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "mastodon",
DisplayName: "Mastodon",
Icon: "https://icons.duckduckgo.com/ip3/mastodon.social.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return mastodon.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "meetup",
DisplayName: "Meetup",
Icon: "https://icons.duckduckgo.com/ip3/meetup.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return meetup.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "microsoftonline",
DisplayName: "Microsoft Online",
Icon: "https://icons.duckduckgo.com/ip3/www.microsoft.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return microsoftonline.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "naver",
DisplayName: "Naver",
Icon: "https://icons.duckduckgo.com/ip3/naver.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return naver.New(clientKey, secret, callback), nil
},
},
{
Name: "nextcloud",
DisplayName: "Nextcloud",
Icon: "https://icons.duckduckgo.com/ip3/nextcloud.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
if nextcloudURL, ok := custom["nextcloudURL"].(string); ok {
return nextcloud.NewCustomisedDNS(clientKey, secret, callback, nextcloudURL, scopes...), nil
} else {
return nextcloud.NewCustomisedURL(clientKey, secret, callback, custom["authURL"].(string), custom["tokenURL"].(string), custom["profileURL"].(string), scopes...), nil
}
},
},
{
Name: "okta",
DisplayName: "Okta",
Icon: "https://icons.duckduckgo.com/ip3/okta.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return okta.New(clientKey, secret, custom["orgURL"].(string), callback), nil
},
},
{
Name: "onedrive",
DisplayName: "OneDrive",
Icon: "https://icons.duckduckgo.com/ip3/onedrive.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return onedrive.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "openid-connect",
DisplayName: "OpenID Connect",
Icon: "https://icons.duckduckgo.com/ip3/openid.net.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
var (
c *openidConnect.Provider
err error
)
if autoDiscoveryURL, ok := custom["openIDAutoDiscoveryURL"].(string); ok {
c, err = openidConnect.New(clientKey, secret, callback, autoDiscoveryURL, scopes...)
} else {
c, err = openidConnect.NewCustomisedURL(clientKey, secret, callback, custom["authURL"].(string), custom["tokenURL"].(string), custom["issuerURL"].(string), custom["userInfoURL"].(string), custom["endSessionEndpointURL"].(string), scopes...)
}
if err != nil {
return nil, err
}
if skipUserInfoRequest, ok := custom["skipUserInfoRequest"].(bool); ok {
c.SkipUserInfoRequest = skipUserInfoRequest
}
return c, err
},
},
{
Name: "patreon",
DisplayName: "Patreon",
Icon: "https://icons.duckduckgo.com/ip3/patreon.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return patreon.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "paypal",
DisplayName: "PayPal",
Icon: "https://icons.duckduckgo.com/ip3/paypal.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return paypal.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "salesforce",
DisplayName: "Salesforce",
Icon: "https://icons.duckduckgo.com/ip3/salesforce.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return salesforce.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "seatalk",
DisplayName: "SeaTalk",
Icon: "https://icons.duckduckgo.com/ip3/seatalk.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return seatalk.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "shopify",
DisplayName: "Shopify",
Icon: "https://icons.duckduckgo.com/ip3/shopify.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return shopify.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "slack",
DisplayName: "Slack",
Icon: "https://icons.duckduckgo.com/ip3/slack.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return slack.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "soundcloud",
DisplayName: "SoundCloud",
Icon: "https://icons.duckduckgo.com/ip3/soundcloud.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return soundcloud.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "spotify",
DisplayName: "Spotify",
Icon: "https://icons.duckduckgo.com/ip3/spotify.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return spotify.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "steam",
DisplayName: "Steam",
Icon: "https://icons.duckduckgo.com/ip3/steamcommunity.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return steam.New(clientKey, callback), nil
},
},
{
Name: "strava",
DisplayName: "Strava",
Icon: "https://icons.duckduckgo.com/ip3/strava.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return strava.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "stripe",
DisplayName: "Stripe",
Icon: "https://icons.duckduckgo.com/ip3/stripe.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return stripe.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "tiktok",
DisplayName: "TikTok",
Icon: "https://icons.duckduckgo.com/ip3/tiktok.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return tiktok.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "twitch",
DisplayName: "Twitch",
Icon: "https://icons.duckduckgo.com/ip3/twitch.tv.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return twitch.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "twitter",
DisplayName: "Twitter (v1)",
Icon: "https://icons.duckduckgo.com/ip3/twitter.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return twitter.New(clientKey, secret, callback), nil
},
},
{
Name: "twitterv2",
DisplayName: "Twitter (v2)",
Icon: "https://icons.duckduckgo.com/ip3/twitter.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return twitterv2.New(clientKey, secret, callback), nil
},
},
//{ // https://nulab.com/blog/company-news/typetalk-sunsetting/
// Name: "typetalk",
// DisplayName: "TypeTalk",
// Icon: "https://icons.duckduckgo.com/ip3/typetalk.com.ico",
// New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
// return typetalk.New(clientKey, secret, callback, scopes...), nil
// },
//},
{
Name: "uber",
DisplayName: "Uber",
Icon: "https://icons.duckduckgo.com/ip3/uber.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return uber.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "vk",
DisplayName: "VK",
Icon: "https://icons.duckduckgo.com/ip3/vk.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return vk.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "wecom",
DisplayName: "WeCom",
Icon: "https://icons.duckduckgo.com/ip3/wework.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return wecom.New(clientKey, secret, custom["agentID"].(string), callback), nil
},
},
{
Name: "wepay",
DisplayName: "WePay",
Icon: "https://icons.duckduckgo.com/ip3/wepay.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return wepay.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "xero",
DisplayName: "Xero",
Icon: "https://icons.duckduckgo.com/ip3/xero.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return xero.New(clientKey, secret, callback), nil
},
},
{
Name: "yahoo",
DisplayName: "Yahoo",
Icon: "https://icons.duckduckgo.com/ip3/yahoo.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return yahoo.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "yammer",
DisplayName: "Yammer",
Icon: "https://icons.duckduckgo.com/ip3/yammer.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return yammer.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "yandex",
DisplayName: "Yandex",
Icon: "https://icons.duckduckgo.com/ip3/yandex.com.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return yandex.New(clientKey, secret, callback, scopes...), nil
},
},
{
Name: "zoom",
DisplayName: "Zoom",
Icon: "https://icons.duckduckgo.com/ip3/zoom.us.ico",
New: func(clientKey, secret, callback string, custom map[string]interface{}, scopes ...string) (goth.Provider, error) {
return zoom.New(clientKey, secret, callback, scopes...), nil
},
},
}