-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(provider): add Zoho provider (#1516)
* feat(provider): add zoho * fix: use LF instead of CRLF * fix: crlf to lf line endings Co-authored-by: Balázs Orbán <info@balazsorban.com>
- Loading branch information
1 parent
07a3f76
commit 776b948
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export default (options) => { | ||
return { | ||
id: 'zoho', | ||
name: 'Zoho', | ||
type: 'oauth', | ||
version: '2.0', | ||
scope: 'AaaServer.profile.Read', | ||
params: { grant_type: 'authorization_code' }, | ||
accessTokenUrl: 'https://accounts.zoho.com/oauth/v2/token', | ||
authorizationUrl: 'https://accounts.zoho.com/oauth/v2/auth?response_type=code', | ||
profileUrl: 'https://accounts.zoho.com/oauth/user/info', | ||
profile: (profile) => { | ||
return { | ||
id: profile.ZUID, | ||
name: `${profile.First_Name} ${profile.Last_Name}`, | ||
email: profile.Email, | ||
image: null | ||
} | ||
}, | ||
...options | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
id: zoho | ||
title: Zoho | ||
--- | ||
|
||
## Documentation | ||
|
||
https://www.zoho.com/accounts/protocol/oauth/web-server-applications.html | ||
|
||
## Configuration | ||
|
||
https://api-console.zoho.com/ | ||
|
||
## Example | ||
|
||
```js | ||
import Providers from `next-auth/providers` | ||
... | ||
providers: [ | ||
Providers.Zoho({ | ||
clientId: process.env.ZOHO_CLIENT_ID, | ||
clientSecret: process.env.ZOHO_CLIENT_SECRET | ||
}) | ||
] | ||
... | ||
``` |
776b948
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: