2024-02-05 12:40:51 +00:00
|
|
|
from appwrite.client import Client
|
2024-02-21 11:31:50 +00:00
|
|
|
from appwrite.enums import OAuthProvider
|
2024-02-05 12:40:51 +00:00
|
|
|
|
|
|
|
|
client = Client()
|
2024-11-06 11:07:14 +00:00
|
|
|
client.set_endpoint('https://<REGION>.cloud.appwrite.io/v1') # Your API Endpoint
|
2024-02-21 11:31:50 +00:00
|
|
|
client.set_project('5df5acd0d48c2') # Your project ID
|
2024-02-05 12:40:51 +00:00
|
|
|
|
|
|
|
|
account = Account(client)
|
|
|
|
|
|
2024-02-21 11:31:50 +00:00
|
|
|
result = account.create_o_auth2_session(
|
|
|
|
|
provider = OAuthProvider.AMAZON,
|
|
|
|
|
success = 'https://example.com', # optional
|
|
|
|
|
failure = 'https://example.com', # optional
|
|
|
|
|
scopes = [] # optional
|
|
|
|
|
)
|