diff --git a/react-native-sign-in-with-neynar/package.json b/react-native-sign-in-with-neynar/package.json index a8ced65..5c77234 100644 --- a/react-native-sign-in-with-neynar/package.json +++ b/react-native-sign-in-with-neynar/package.json @@ -1,6 +1,6 @@ { "name": "@neynar/react-native-signin", - "version": "1.0.3", + "version": "1.1.0", "keywords": [ "react-native", "neynar", diff --git a/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx b/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx index 6ffdd55..3a79be4 100644 --- a/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx +++ b/react-native-sign-in-with-neynar/src/NeynarSigninButton.tsx @@ -43,6 +43,7 @@ interface IProps { fetchAuthorizationUrl: () => Promise; successCallback: (data: ISuccessMessage) => void; errorCallback?: (error: any) => void; + redirectUrl?: string; theme?: Theme; variant?: Variant; height?: number; @@ -78,6 +79,7 @@ export const NeynarSigninButton = ({ fetchAuthorizationUrl, successCallback, errorCallback = () => {}, + redirectUrl, theme = Theme.LIGHT, variant = Variant.NEYNAR, height, @@ -107,7 +109,10 @@ export const NeynarSigninButton = ({ const handleOnPress = async () => { try { - const authUrl = await fetchAuthorizationUrl(); + let authUrl = await fetchAuthorizationUrl(); + if (redirectUrl) { + authUrl = `${authUrl}&deeplink_url=${encodeURIComponent(redirectUrl)}`; + } setAuthUrl(authUrl); setModalVisible(true); } catch (error) {