Copy npm i react-native-webview expo-secure-store
Copy import {Secqure_Webview} from "secqure-react-native-sdk"
Copy <NavigationContainer>
<Stack.Screen name="Secqure_Webview" component={Secqure_Webview} />
</NavigationContainer>
Copy navigation.navigate("Secqure_Webview", {
apiKey: "XXXXXXXXXXXXXXXX",
secretKey: "XXXXXXXXXXXX",
callback: (payload) => {},
});
Secqure returns User details and tokens upon first authentication and only tokens in subsequent authentications. You can use User identity information as required. Your backend server should validate the access & Id tokens and extract information. Use SDKs to validate tokens
Copy {
"tokens": {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiO...",
"idToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIz...",
"refreshToken": "f76d722afc0ec69e5aa11838a03569a524f3a2448932"
},
"user": {
"pubKey": "i50MtIDpmQaFqozPYR6u3diOft0X6X75",
"userId": "XXXXXX",
"systemId": "3526b57c-f017-4659-bbb4-b1442046e46e",
"createTime": "2022-01-17T07:21:34.356Z",
"updateTime": "2022-01-17T07:21:49.000Z",
"deviceType": "Win32",
"deviceName": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36"
}
}
Copy {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiO...",
"idToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIz...",
"refreshToken": "f76d722afc0ec69e5aa11838a03569a524f3a2448932"
}