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
- Failed to load data from database
My app broken, it throw AppwriteException exception. Few days ago it works well. AppwriteException: , ClientException with SocketException: Failed host lookup:...
- Getting CORS error when accessing websit...
When accessing my website I'm getting: (index):1 Access to font at 'https://assets.appwrite.io/fonts/inter/Inter-Regular.woff2' from origin 'https://mvp-site-ra...
- Questions about requests count on dashbo...
Hi guys I am new to this platform so I dont know if I am doing anything wrong. On dsahboard the request count is about 50k even though I dont feel like I have d...