Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 403 Bytes

File metadata and controls

16 lines (12 loc) · 403 Bytes
import { Client, Oauth2 } from "react-native-appwrite";

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

const oauth2 = new Oauth2(client);

const result = await oauth2.createGrant({
    projectId: '<PROJECT_ID>',
    userCode: '<USER_CODE>'
});

console.log(result);