We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cd647c commit e79fc35Copy full SHA for e79fc35
src/index.tsx
@@ -182,10 +182,20 @@ export function useNetlifyIdentity(
182
183
/******* email auth */
184
const signupUser = useCallback(
185
- (email: string, password: string, data: Object) =>
186
- // TODO: make setUser optional?
187
- goTrueInstance.signup(email, password, data).then(_setUser),
188
- [goTrueInstance]
+ (
+ email: string,
+ password: string,
+ data: Object,
189
+ directLogin: boolean = true
190
+ ) =>
191
+ goTrueInstance.signup(email, password, data).then(user => {
192
+ if (directLogin) {
193
+ _setUser(user);
194
+ }
195
+
196
+ return user;
197
+ }),
198
+ [goTrueInstance, _setUser]
199
);
200
201
const loginUser = useCallback(
0 commit comments