File tree 2 files changed +32
-22
lines changed
packages/next-auth/src/providers
2 files changed +32
-22
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ import type { OAuthConfig , OAuthUserConfig } from "."
2
+
3
+ export interface SalesforceProfile extends Record < string , any > {
4
+ sub : string
5
+ nickname : string
6
+ email : string
7
+ picture : string
8
+ }
9
+
10
+ export default function Salesforce < P extends SalesforceProfile > (
11
+ options : OAuthUserConfig < P >
12
+ ) : OAuthConfig < P > {
13
+ const { issuer = "https://login.salesforce.com" } = options
14
+ return {
15
+ id : "salesforce" ,
16
+ name : "Salesforce" ,
17
+ type : "oauth" ,
18
+ authorization : `${ issuer } /services/oauth2/authorize?display=page` ,
19
+ token : `${ issuer } /services/oauth2/token` ,
20
+ userinfo : `${ issuer } /services/oauth2/userinfo` ,
21
+ profile ( profile ) {
22
+ return {
23
+ id : profile . user_id ,
24
+ name : null ,
25
+ email : null ,
26
+ image : profile . picture ,
27
+ }
28
+ } ,
29
+ checks : [ "none" ] ,
30
+ options,
31
+ }
32
+ }
You can’t perform that action at this time.
1 commit comments
mrcampbell commentedon Jun 28, 2022
Not sure what happened, but all my apps using this code stopped working, throwing this error: