Authenticate
To make authenticated requests to Teya APIs, you first need a Developer Portal account (create one here) and a correctly configured application. The setup process varies depending on your application type, you can find the instructions below for each type.
Web applications
- Select your application to view its details and click "Application settings".
- You can select "Edit settings" to edit any of the fields below.
| Setting | Description |
|---|---|
| Application name | Enter a user-friendly name for your application (e.g. MyShopApp). |
| Application URL | A URL (e.g. https://www.myshopapp.com/login) to redirect the user to if the session expires or the user bookmarks the login. This URL must be on the same domain as the Redirect URLs. |
| Redirect URLs | A set of URLs (e.g. https://www.myshopapp.com/auth/callback) that are allowed to redirect the user during OAuth flows. |
| Post logout redirect URIs | A set of URIs (e.g. https://www.myshopapp.com/logout) that the user can be redirected to after logout. |
| Backchannel logout URIs | A URI (e.g https://www.myshopapp.com/backchannel-logout) to handle the logout process when using backchannel logout functionality. It serves as a callback endpoint where logout-related information is transmitted, allowing your application to initiate the logout process and ensure that the users are logged out. |
| Enable two factor authentication | Requires users to provide an additional form of authentication (see below). |
Two factor authentication
Two-factor authentication (2FA) is a security feature that adds an extra layer of protection to your application. Teya supports WebAuthn, a modern and secure standard for 2FA that allows users to authenticate using public key cryptography.
Once enabled your users will need to provide two forms of authentication, their Teya account (email and password) and either biometric or passcode, which they will be prompted to configure the first time they log in.
To enable 2FA from your application settings:
- Log in to the Developer Portal.
- Select your application from the 'Applications' page (note 2FA only applies to "Web" applications, which require a user to be logged in to access Teya APIs).
- Select 'Application settings'
- 'Edit' and check the 'enable two factor authentication' checkbox.
- 'Save' to confirm your settings.
That's it! With WebAuthn 2FA enabled for your application. You can disable 2FA at any time by visiting application settings.
Device code applications
Select your device code application to view details and click "Application settings".