Generate a social network linking URL for a user profile.
privateKey
field, which allows you to preserve all characters including newlines.
The Private Key must be precise, meaning preserving all characters including newlines.
If you paste the key into your code, you might need to manually replace newlines with a \n
character or URL encode the string.
Pasting the key directly into code often causes issues.
expiresIn
for additional options.
generateJWT
endpoint does not validate the returned JWT URL by default.
For example, if a corrupt Private Key is passed into generateJWT
a URL will still be returned and the URL result in a 401 error.
You can verify the returned JWT URL by including verify: true
in the generateJWT
body parameters. If the JWT URL cannot be validated an error will be returned. For example, if the Private Key had a character removed the following would be returned:
verify: true
only in a non-production environment since the validation takes additional processing time.
profileKey
body field, and click the blue Send button.
All other required fields are already filled in.
You can also generate the code from Postman, or read the key file from a directory or database.
expiresIn
field.
For example, send the following JSON to set the JWT URL valid for 30 minutes:
jwtURL
String variable with the return from the /generateJWT endpoint.
UIViewController
and SFSafariViewControllerDelegate
.
We don’t recommend using a WebView
since some social networks such as Facebook and Google block authentication.
UIViewController
or the SFSafariViewController
.
However, you can achieve a similar functionality by using the url_launcher
package to open web URLs.
SFSafariViewController
, but you can achieve a similar result with the WebBrowser
API provided by expo-web-browser
, which opens a URL in a modal browser window that shares cookies with the system browser. Otherwise, you can use the built-in React Native Linking
function to open Safari: await Linking.canOpenURL(jwtURL);
[email protected]
with the company name ACME, contact email [email protected]
, and links to the terms and privacy policy:
Social Connect Hub <[email protected]>