mirror of
https://github.com/SrIzan10/next-auth.git
synced 2026-05-01 10:55:20 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a7a494701 | ||
|
|
9fa82cedbd | ||
|
|
b0408284b8 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "next-auth",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"description": "An authentication library for Next.js",
|
||||
"repository": "https://github.com/iaincollins/next-auth.git",
|
||||
"author": "Iain Collins <me@iaincollins.com>",
|
||||
|
||||
@@ -4,12 +4,13 @@ export default (options) => {
|
||||
name: 'Auth0',
|
||||
type: 'oauth',
|
||||
version: '2.0',
|
||||
params: { grant_type: 'authorization_code', response_type: 'code' },
|
||||
params: { grant_type: 'authorization_code' },
|
||||
scope: 'openid email profile',
|
||||
accessTokenUrl: `https://${options.subdomain}.auth0/oauth/token`,
|
||||
authorizationUrl: `https://${options.subdomain}.auth0.com/authorize?`,
|
||||
profileUrl: `http://${options.subdomain}.auth0.com/userinfo`,
|
||||
accessTokenUrl: `https://${options.domain}/oauth/token`,
|
||||
authorizationUrl: `https://${options.domain}/authorize?response_type=code`,
|
||||
profileUrl: `https://${options.domain}/userinfo`,
|
||||
profile: (profile) => {
|
||||
console.log(profile)
|
||||
return {
|
||||
id: profile.sub,
|
||||
name: profile.nickname,
|
||||
|
||||
@@ -27,7 +27,7 @@ NextAuth.js can be used with or without a database.
|
||||
|
||||
* An open source solution that allows you to keep control of your data
|
||||
* Supports Bring Your Own Database (BYOD) and can be used with any database
|
||||
* Built-in support for for [MySQL, MariaDB, Postgres, MongoDB and SQLite](/configuration/database)
|
||||
* Built-in support for [MySQL, MariaDB, Postgres, MongoDB and SQLite](/configuration/database)
|
||||
* Works great with databases from popular hosting providers
|
||||
* Can also be used *without a database* (e.g. OAuth + JWT)
|
||||
|
||||
|
||||
@@ -11,6 +11,10 @@ https://auth0.com/docs/api/authentication#authorize-application
|
||||
|
||||
https://manage.auth0.com/dashboard
|
||||
|
||||
:::tip
|
||||
Configure your application in Auth0 as a 'Regular Web Application' (not a 'Single Page App').
|
||||
:::
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
@@ -20,8 +24,12 @@ providers: [
|
||||
Providers.Auth0({
|
||||
clientId: process.env.AUTH0_CLIENT_ID,
|
||||
clientSecret: process.env.AUTH0_CLIENT_SECRET,
|
||||
subdomain: process.env.AUTH0_SUBDOMAIN
|
||||
domain: process.env.AUTH0_DOMAIN
|
||||
})
|
||||
}
|
||||
...
|
||||
```
|
||||
```
|
||||
|
||||
:::note
|
||||
`domain` should be the fully qualified domain – e.g. `dev-s6clz2lv.eu.auth0.com`
|
||||
:::
|
||||
@@ -107,6 +107,10 @@ html[data-theme='dark'] .hero {
|
||||
background: linear-gradient(0deg, rgba(222,222,222,0.075) 0%, rgba(255,255,255,0) 100%);
|
||||
}
|
||||
|
||||
.hero .container {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.hero .hero__title {
|
||||
font-size: 3rem;
|
||||
margin-bottom: 0.5rem;
|
||||
@@ -128,10 +132,6 @@ html[data-theme='dark'] .hero {
|
||||
.hero .hero__subtitle {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.hero .container {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.home-subtitle {
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
.features h2 {
|
||||
font-size: 2rem;
|
||||
line-height: 3rem;
|
||||
margin: 2rem 0 4rem 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user