Skip to content

Commit 475a697

Browse files
author
sw-yx
committed
merge
2 parents b396562 + ece08ed commit 475a697

33 files changed

+9297
-1281
lines changed

CHANGELOG.md

+397-3
Large diffs are not rendered by default.

README.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
A component used to authenticate with Netlify's Identity service.
44
[Live demo](https://identity.netlify.com)
55

6-
For a lower level library to the underlying [GoTrue](https://github.com/netlify/gotrue) API, see
7-
[gotrue-js](https://github.com/netlify/gotrue-js).
8-
96
For usage example with React and React Router, please see our `/example` folder and [read the README](https://github.com/netlify/netlify-identity-widget/tree/master/example).
107

118
## What is Netlify Identity
@@ -131,6 +128,7 @@ module API. Options include:
131128
{
132129
container: '#some-query-selector'; // container to attach to
133130
APIUrl: 'https://www.example.com/.netlify/functions/identity'; // Absolute url to endpoint. ONLY USE IN SPECIAL CASES!
131+
namePlaceholder: 'some-placeholder-for-Name'; // custom placeholder for name input form
134132
}
135133
```
136134

@@ -157,8 +155,23 @@ https://olddvdscreensaver.com
157155

158156
![](devmode.png)
159157

158+
159+
## List of Alternatives
160+
161+
**Lowest level JS Library**: If you want to use the official Javascript bindings to GoTrue, Netlify's underlying Identity service written in Go, use https://github.com/netlify/gotrue-js
162+
163+
**React bindings**: If you want a thin wrapper over Gotrue-js for React, `react-netlify-identity` is a "headless" library, meaning there is no UI exported and you will write your own UI to work with the authentication. https://github.com/sw-yx/react-netlify-identity
164+
165+
**High level overlay**: If you want a "widget" overlay that gives you a nice UI out of the box, with a somewhat larger bundle, check https://github.com/netlify/netlify-identity-widget
166+
167+
**High level popup**: If you want a popup window approach also with a nice UI out of the box, and don't mind the popup flow, check https://github.com/netlify/netlify-auth-providers
168+
169+
You can also see an example of wrapping netlify-identity-widget in a React Hook here: https://github.com/sw-yx/netlify-fauna-todo/blob/master/src/hooks/useNetlifyIdentity.js
170+
160171
## FAQ
161172

173+
* Typescript Typings are maintained by @nkprince007 ([see PR](https://github.com/DefinitelyTyped/DefinitelyTyped/pull/30689)): `npm install @types/netlify-identity-widget` and then `import * as NetlifyIdentityWidget from "netlify-identity-widget"` (or `import NetlifyIdentityWidget from "netlify-identity-widget"` if you have `--allowSyntheticDefaultImports` on)
174+
162175
* If you experience a 404 while testing the Netlify Identity Widget on a local
163176
environment, you can manually remove the netlifySiteURL from localStorage by
164177
doing the following in the console.

RELEASE.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Release Checklist
22

3+
Make sure you have npm + git credentials set up.
4+
35
- [ ] Make changes and/or merge PRs.
4-
- [ ] Document changes in a gh-release draft. If no draft exists, create one.
56
- [ ] `git checkout master`
67
- [ ] `git pull`
78
- [ ] `npm version [ major | minor | patch ]`
8-
- [ ] `git push && git push --tags`
9-
- [ ] Assign draft gh-release to new tag and publish release notes and double check everything looks right.
10-
- [ ] `npm publish`
9+
- [ ] `npm run publish`

example/.netlify/state.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"siteId": "581ed9db-5771-4757-9561-9b68ed34992e"
3+
}
File renamed without changes.

example/README.md renamed to example/react/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ The source code is at https://github.com/netlify/netlify-identity-widget/tree/ma
77
and it is deployed at: https://netlify-identity-widget-react-example.netlify.com
88

99
For more info on the `netlify-identity-widget`, [find the repo here.](https://github.com/netlify/netlify-identity-widget/)
10+
11+
12+
---
13+
14+
Note: if you are developing with netlify-identity-widget locally you will be prompted for a deployed Netlify Identity site (as we mention in [the Localhost section of the main README](https://github.com/netlify/netlify-identity-widget#localhost)). Sometimes this causes issues with email verification or confirmation and you may need to reset the site. to clear the locally stored Netlify Identity site you previously entered, execute `localStorage.removeItem('netlifySiteURL');` in your window.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

example/vue/README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# vue example
2+
3+
See [@medmin](https://github.com/medmin)'s vue example of using this widget:
4+
5+
- [github.com/whizjs/netlify-identity-demo-vue](https://github.com/whizjs/netlify-identity-demo-vue) (🌎 [example website](https://netlify-identity-demo-vue.netlify.com/))
6+
7+
Thanks [@medmin](https://github.com/medmin) 🙏

package.json

+34-24
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,14 @@
11
{
22
"name": "netlify-identity-widget",
3-
"version": "1.4.15",
4-
"releaseVersion": "v1",
53
"description": "Netlify Identity widget for easy integration",
6-
"scripts": {
7-
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --progress --config webpack.config.babel.js",
8-
"react-demo": "cd example && yarn && yarn start",
9-
"prestart": "run-s build",
10-
"version": "run-s release",
11-
"prepublish": "run-s build",
12-
"build": "run-p build:*",
13-
"build:bundle": "cross-env NODE_ENV=production webpack --config webpack.config.babel.js",
14-
"build:umd": "cross-env NODE_ENV=production webpack --config webpack.umd.config.babel.js",
15-
"prebuild": "rimraf build && mkdirp build",
16-
"test": "eslint src",
17-
"release": "node ./script/release.js",
18-
"format": "prettier --write 'src/**/*.js'",
19-
"format-preview": "prettier --list-different 'src/**/*.js'"
20-
},
21-
"main": "./build/netlify-identity",
22-
"keywords": [
23-
"netlify",
24-
"identity",
25-
"authentication"
26-
],
27-
"license": "MIT",
4+
"version": "1.5.2",
285
"author": "Matt Biilmann <[email protected]>",
6+
"bugs": {
7+
"url": "https://github.com/netlify/netlify-identity-widget/issues"
8+
},
9+
"dependencies": {},
2910
"devDependencies": {
11+
"auto-changelog": "^1.10.2",
3012
"babel-cli": "^6.5.2",
3113
"babel-core": "^6.24.0",
3214
"babel-eslint": "^8.2.1",
@@ -47,6 +29,7 @@
4729
"eslint-plugin-prettier": "^2.5.0",
4830
"eslint-plugin-react": "^7.6.1",
4931
"file-loader": "^1.1.6",
32+
"gh-release": "^3.4.0",
5033
"gotrue-js": "^0.9.21",
5134
"html-webpack-plugin": "^2.28.0",
5235
"json-loader": "^0.5.4",
@@ -67,5 +50,32 @@
6750
"webpack": "^3.0.0",
6851
"webpack-dev-server": "^2.11.1",
6952
"webpack-node-externals": "^1.6.0"
53+
},
54+
"homepage": "https://identity.netlify.com",
55+
"keywords": [
56+
"authentication",
57+
"identity",
58+
"netlify"
59+
],
60+
"license": "MIT",
61+
"main": "./build/netlify-identity",
62+
"releaseVersion": "v1",
63+
"repository": "netlify/netlify-identity-widget",
64+
"scripts": {
65+
"build": "run-p build:*",
66+
"build:bundle": "cross-env NODE_ENV=production webpack --config webpack.config.babel.js",
67+
"build:umd": "cross-env NODE_ENV=production webpack --config webpack.umd.config.babel.js",
68+
"changelog": "auto-changelog --template keepachangelog -p && git add CHANGELOG.md",
69+
"dev": "cross-env NODE_ENV=development webpack-dev-server --inline --progress --config webpack.config.babel.js",
70+
"format": "prettier --write 'src/**/*.js'",
71+
"format-preview": "prettier --list-different 'src/**/*.js'",
72+
"prebuild": "rimraf build && mkdirp build",
73+
"prepublish": "run-s build",
74+
"prestart": "run-s build",
75+
"publish": "git push && git push --tags && gh-release",
76+
"react-demo": "cd example && yarn && yarn start",
77+
"release": "node ./script/release.js",
78+
"test": "eslint src",
79+
"version": "run-s release changelog"
7080
}
7181
}

releases/v1/netlify-identity-widget.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

releases/v1/netlify-identity-widget.js.map

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

releases/v1/netlify-identity.js

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

releases/v1/netlify-identity.js.map

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)