Skip to content

Commit 48726cb

Browse files
authored
Merge pull request #2 from wouterraateland/wouterraateland-patch-1
Add remember option to loginUser
2 parents 60a9cd2 + 0ecb730 commit 48726cb

File tree

3 files changed

+607
-311
lines changed

3 files changed

+607
-311
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"react-dom": "^15.0.0 || ^16.0.0"
2828
},
2929
"devDependencies": {
30+
"@svgr/rollup": "^4.1.0",
3031
"@types/jest": "^23.1.5",
3132
"@types/react": "^16.7.13",
3233
"@types/react-dom": "^16.0.11",

src/index.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export function useNetlifyIdentity(domain: string, onAuthChange: authChangeParam
2929
// make sure the Registration preferences under Identity settings in your Netlify dashboard are set to Open.
3030
const signupUser = (email: string, password: string, data: Object) =>
3131
goTrueInstance.signup(email, password, data).then(_setUser) // TODO: make setUser optional?
32-
const loginUser = (email: string, password: string) => goTrueInstance.login(email, password).then(_setUser)
32+
const loginUser = (email: string, password: string, remember: boolean) =>
33+
goTrueInstance.login(email, password, remember).then(_setUser)
3334
const requestPasswordRecovery = (email: string) => goTrueInstance.requestPasswordRecovery(email)
3435
const recoverAccount = (token: string, remember?: boolean | undefined) => goTrueInstance.recover(token, remember)
3536
const updateUser = (fields: Object) => {

0 commit comments

Comments
 (0)