
I show this example in appwrite docs . I know using flutter sdk. but not sure how it works with dart-sdk server side ?
TypeScript
Client client = Client()
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
Account account = Account(client);
await account.createOAuth2Token(
provider: OAuthProvider.amazon,
success: 'https://example.com', // (optional)
failure: 'https://example.com', // (optional)
scopes: [], // (optional)
);```
TL;DR
The developer is unsure how to use createOAuth2Token in a Cloud Function using the Dart server SDK, even after looking at the example provided in the Appwrite documentation.
Solution: The code snippet provided already shows how to use createOAuth2Token in a Cloud Function using the Dart server SDK. The developer needs to ensure they have set up the client endpoint and project ID correctly.
How to Use createOAuth2Token in Cloud Function using dart server sdk
Recommended threads
- Sharing cookies
Hi, I’m using Appwrite Cloud, and I have a setup where my Appwrite backend is hosted on a subdomain (e.g., api.example.com), while my frontend (Next.js app) and...
- Custom Domain Issue
i have added a custom domain about 21 hours ago, but till now there is no SSL certificate is active on it. but if i do DNS check via https://dnschecker.org/#C...
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
