appwrite/docs/examples/1.6.x/client-react-native/examples/account/create-o-auth2session.md
2025-04-24 14:46:03 +00:00

473 B

import { Client, Account, OAuthProvider } from "react-native-appwrite";

const client = new Client() .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint .setProject('<YOUR_PROJECT_ID>'); // Your project ID

const account = new Account(client);

account.createOAuth2Session( OAuthProvider.Amazon, // provider 'https://example.com', // success (optional) 'https://example.com', // failure (optional) [] // scopes (optional) );