@erikey/react 0.4.35 → 0.4.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -40,7 +40,8 @@ export interface AuthFlowProps
|
|
|
40
40
|
initialView?: AuthFlowView
|
|
41
41
|
/**
|
|
42
42
|
* URL to redirect to after successful authentication.
|
|
43
|
-
*
|
|
43
|
+
* Used by OAuth callbacks and underlying auth forms.
|
|
44
|
+
* In "internal" mode, session state change triggers re-render automatically.
|
|
44
45
|
*/
|
|
45
46
|
redirectTo?: string
|
|
46
47
|
/**
|
|
@@ -295,16 +296,11 @@ export function AuthFlow({
|
|
|
295
296
|
// Forward to user's handler
|
|
296
297
|
onEvent?.(event)
|
|
297
298
|
|
|
298
|
-
// In internal mode,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
externalNavigate(redirectTo)
|
|
302
|
-
} else {
|
|
303
|
-
window.location.href = redirectTo
|
|
304
|
-
}
|
|
305
|
-
}
|
|
299
|
+
// In internal mode, don't auto-redirect on AUTH_SUCCESS
|
|
300
|
+
// Let React re-render based on session state (useSession hook)
|
|
301
|
+
// User can handle AUTH_SUCCESS in onEvent if custom behavior needed
|
|
306
302
|
},
|
|
307
|
-
[onEvent
|
|
303
|
+
[onEvent]
|
|
308
304
|
)
|
|
309
305
|
|
|
310
306
|
// Get the view key for AuthView component
|