@erikey/react 0.4.34 → 0.4.35

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erikey/react",
3
- "version": "0.4.34",
3
+ "version": "0.4.35",
4
4
  "description": "React SDK for Erikey - B2B authentication and user management. UI components based on better-auth-ui.",
5
5
  "main": "./dist/index.mjs",
6
6
  "module": "./dist/index.mjs",
@@ -246,13 +246,27 @@ export function AuthFlow({
246
246
  // In route mode, or for non-auth paths, let the link work normally
247
247
  }
248
248
 
249
- // If external Link provided (e.g., react-router), use it
249
+ // In internal mode for auth paths, ALWAYS use plain <a> that we control
250
+ // This avoids relying on external Link components forwarding onClick
251
+ if (mode === "internal" && isAuthPath(href)) {
252
+ return (
253
+ <a
254
+ href={href}
255
+ className={linkClassName}
256
+ onClick={handleClick}
257
+ {...rest}
258
+ >
259
+ {children}
260
+ </a>
261
+ )
262
+ }
263
+
264
+ // For non-auth paths or route mode, use external Link if provided
250
265
  if (ExternalLink) {
251
266
  return (
252
267
  <ExternalLink
253
268
  href={href}
254
269
  className={linkClassName}
255
- onClick={handleClick}
256
270
  {...rest}
257
271
  >
258
272
  {children}