Skip to content

Commit

Permalink
removed experimental
Browse files Browse the repository at this point in the history
  • Loading branch information
jmderby committed Feb 16, 2025
1 parent 4601d8f commit fcfaa04
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .changeset/pink-dots-invite.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@crossmint/client-sdk-react-ui": patch
---

Fixed onSuccessLogin callback and marked it as experimental prop
Fixed bug with onSuccessLogin callback
1 change: 0 additions & 1 deletion packages/client/auth/src/CrossmintAuthClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,5 +306,4 @@ export class CrossmintAuthClient extends CrossmintAuth {
type CrossmintAuthClientCallbacks = {
onTokenRefresh?: (authMaterial: AuthMaterialWithUser) => void;
onLogout?: () => void;
onLoginSuccess?: () => void;
};
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export type CrossmintAuthProviderProps = {
embeddedWallets?: CrossmintAuthWalletConfig;
appearance?: UIConfig;
termsOfServiceText?: string | ReactNode;
EXPERIMENTAL_onLoginSuccess?: () => void;
onLoginSuccess?: () => void;
authModalTitle?: string;
children: ReactNode;
loginMethods?: LoginMethod[];
Expand Down Expand Up @@ -77,7 +77,7 @@ export function CrossmintAuthProvider({
appearance,
termsOfServiceText,
authModalTitle,
EXPERIMENTAL_onLoginSuccess,
onLoginSuccess,
loginMethods = ["email", "google"],
refreshRoute,
logoutRoute,
Expand Down Expand Up @@ -114,8 +114,8 @@ export function CrossmintAuthProvider({
const [defaultEmail, setdefaultEmail] = useState<string | undefined>(undefined);

const triggerHasJustLoggedIn = useCallback(() => {
EXPERIMENTAL_onLoginSuccess?.();
}, [EXPERIMENTAL_onLoginSuccess]);
onLoginSuccess?.();
}, [onLoginSuccess]);

useEffect(() => {
if (crossmint.jwt == null) {
Expand All @@ -130,7 +130,7 @@ export function CrossmintAuthProvider({
setDialogOpen(false);
triggerHasJustLoggedIn();
}
}, [crossmint.jwt, dialogOpen, EXPERIMENTAL_onLoginSuccess]);
}, [crossmint.jwt, dialogOpen, onLoginSuccess]);

const login = (defaultEmail?: string | MouseEvent) => {
if (crossmint.jwt != null) {
Expand Down

0 comments on commit fcfaa04

Please sign in to comment.