0.3.1 • Published 5 years ago
@schnack/plugin-auth-google v0.3.1
auth-google
Adds Google OAuth authentication to your Schnack server.
Usage
Add a plugins.auth-google section to your Schnack config file schnack.json:
{
"plugins": {
"auth-google": {
"client_id": "XXX",
"client_secret": "XXX"
}
}
}Then run
npm init schnackHow to get client_id and client_secret
- Head to console.developers.google.com
- create project
My Project(top left) >new project- Project Name: the name of your blog
- Location: Optional (
No organisationis ok) - create
- switch to new project
- library (on the left)
- search for
google+ api - enable
- search for
- credentials (on the left)
- OAuth Consent Screen tab
- Application Name: the name of your blog
- Support Email
- Authorized domains: add your primary domain (
https://example.comnothttps://schnack.example.com) - Application Homepage link: your front page
- other fields appear to be optional
- create credentials > OAuth Client ID
- Application Type: Web application
- Name: the name of your blog
- Authorized JavaScript Origins: primary domain
- other fields appear to be optional
- note warning:
OAuth is limited to 100 sensitive scope logins until the OAuth consent screen is published. This may require a verification process that can take several days.