@riligar/auth-react 1.19.0 → 1.19.1

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/dist/index.js CHANGED
@@ -102,17 +102,8 @@ function setStoredToken(token) {
102
102
  function handleAuthResponse(result) {
103
103
  // Tenta encontrar o token em vários lugares possíveis
104
104
  const token = result.token || result.session?.token || result.session?.sessionToken;
105
- console.log('[AuthSDK] Handling Auth Response:', {
106
- hasToken: !!result.token,
107
- hasSessionToken: !!result.session?.token,
108
- hasSessionSessionToken: !!result.session?.sessionToken,
109
- extractedToken: token
110
- });
111
105
  if (token) {
112
- console.log('[AuthSDK] Saving token to storage');
113
106
  setStoredToken(token);
114
- } else {
115
- console.warn('[AuthSDK] No token found in response', result);
116
107
  }
117
108
  return result;
118
109
  }
@@ -711,19 +702,12 @@ const useAuthStore = zustand.create((set, get) => ({
711
702
  error: null
712
703
  });
713
704
  try {
714
- console.log('[AuthStore] Revoking session:', {
715
- targetId: sessionId,
716
- currentId: currentSession?.id,
717
- totalSessions: sessions.length
718
- });
719
-
720
705
  // Detect if current session OR last remaining session
721
706
  const isCurrent = sessionId === currentSession?.id;
722
707
  const isLast = sessions.length === 1 && sessions[0].id === sessionId;
723
708
 
724
709
  // Se for a sessão atual ou a última, faz logout normal
725
710
  if (isCurrent || isLast) {
726
- console.log('[AuthStore] Revoking current/last session -> Executing signOut');
727
711
  await signOut();
728
712
  // signOut já limpa loading states e erros no finally, mas
729
713
  // como estamos dentro do fluxo deste método, garantimos: