Compare commits

...

3 Commits
v2.0 ... v2.0.1

Author SHA1 Message Date
jose-donato
5a7a494701 typo 2020-06-23 00:34:44 +01:00
Iain Collins
9fa82cedbd Fix Auth0 provider
Resolves #301
2020-06-23 00:13:55 +01:00
Iain Collins
b0408284b8 Tweak homepage CSS 2020-06-21 17:30:43 +01:00
6 changed files with 22 additions and 12 deletions

View File

@@ -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>",

View File

@@ -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,

View File

@@ -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)

View File

@@ -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`
:::

View File

@@ -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 {

View File

@@ -57,6 +57,7 @@
.features h2 {
font-size: 2rem;
line-height: 3rem;
margin: 2rem 0 4rem 0;
}