Logto is the better identity infrastructure for developers.
Name | Description |
---|---|
Password sign-in sample | A sample of using username and password to sign in. |
Password sign-up sample | A sample of using username and password to register a new account. |
Verification code sign-in sample | A sample of using email and verification code to sign in. |
Verification code sign-up sample | A sample of using email and verification code to register a new account. |
Social sign-in sample (working in progress...) | A sample of using social connector to sign-in. |
Enterprise SSO sign-in (working in progress...) | A sample of using enterprise SSO connector to sign-in. |
Sign-in and bind MFA (Working in progress...) | A sample of signing-in and binding MFA. |
Sign-in with MFA verification (Working in progress...) | A sample of signing-in with MFA verification (TOTP, WebAuthn, etc.) |
Sign-in and fulfill profile (Working in progress...) | A sample of signing-in and fulfilling additional user profile info. |
Sign-up and fulfill profile (Working in progress...) | A sample of signing-up and fulfilling additional user profile info. |
Forgot password (Working in progress...) | A sample of forgot password flow. |
We'll keep adding more samples to this collection. If you have any ideas or requests, please feel free to open an issue
You can build any of the individual sample projects and deploy to your Logto Cloud instance. Here is how you can do it:
- Clone the repository
- Go to the sample project you want to deploy. For example,
cd packages/sign-in-with-password
- Install node dependencies with
pnpm install
(recommended) ornpm install
. - Build the project with
pnpm build
(recommended) ornpm run build
. This will generate adist
folder with the built assets. - Sign in to your Logto Cloud account and create a Machine-to-Machine (M2M) application. Copy the
App ID
andApp secret
from the application settings. - Create a
.env
file in the sample project folder or root folder with the following content:
LOGTO_ENDPOINT=https://<your-tenant-id>.logto.app/
LOGTO_AUTH=<your-app-id>:<your-app-secret>
LOGTO_PATH=<your-workspace-path>/experience-samples/packages/sign-in-with-password/dist
LOGTO_RESOURCE=https://<your-tenant-id>.logto.app/api
- Run
npx logto-tunnel deploy
to deploy the sample custom experience to your Logto Cloud instance, and replace the default Logto sign-in experience. Refer to the Logto tunnel documentation for more details.