Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Account → Create OAuth2 Session
AI-generatedOverview
This node interacts with the Appwrite API to perform various operations on different resources. Specifically, for the 'Account' resource and 'Create OAuth2 Session' operation, it initiates an OAuth2 authentication session with a selected provider. This is useful for automating user authentication workflows where OAuth2 login is required, such as integrating third-party login systems (Google, Facebook, GitHub, etc.) into an application.
Use Case Examples
- Creating an OAuth2 session to authenticate a user via Google and redirecting them to a success or failure URL based on the authentication outcome.
- Automating OAuth2 login flows for multiple providers like GitHub or Microsoft within an app to streamline user access management.
Properties
| Name | Meaning |
|---|---|
| Provider | The OAuth2 provider to use for creating the OAuth2 session, e.g., Google, Facebook, GitHub, etc. |
| Success URL | URL to redirect to after successful authentication. |
| Failure URL | URL to redirect to after failed authentication. |
| Scopes | Comma-separated list of OAuth2 scopes to request during authentication, e.g., email, profile. |
Output
JSON
sessionId- The ID of the created OAuth2 session.authUrl- The URL to which the user should be redirected to complete OAuth2 authentication.status- Status of the OAuth2 session creation, e.g., success or failure.
Dependencies
- Appwrite API
Troubleshooting
- Ensure that the OAuth2 provider credentials are correctly configured in the Appwrite project to avoid authentication failures.
- Verify that the success and failure URLs are valid and accessible to prevent redirection errors.
- Check that the requested OAuth2 scopes are supported by the selected provider to avoid permission issues.
Links
- Appwrite OAuth2 Authentication - Official documentation on how to use OAuth2 with Appwrite accounts.