Skip to content

jonathanpotts/aspire-identity-expo

Repository files navigation

aspire-identity-expo

.NET Node.js License: MIT

Example project using Aspire with an Expo (React Native) frontend and an ASP.NET Core backend that uses ASP.NET Core Identity for authentication backed by PostgreSQL.

📋 Requirements

This project requires the following:

🚀 Running

To run this project, do the following:

  1. Start Docker Desktop or Podman if it is not already running
  2. Use one of the following:
    • .NET CLI: In the AspireIdentityExpo.AppHost directory, run dotnet run and then open the dashboard using the URL output to the console.
    • Aspire CLI: In the repo directory, run aspire run and then open the dashboard using the URL output to the console.
    • Code Editor/IDE: Use the run command in a code editor or IDE such as Visual Studio Code.

🗂️ Projects

AspireIdentityExpo.AppHost

An Aspire AppHost which handles orchestration and hosts the Aspire dashboard.

Uses:

AspireIdentityExpo.ApiService

An ASP.NET Core minimal APIs backend that exposes ASP.NET Core Identity API endpoints for authentication and account management.

Note

The LoggingEmailSender is used in place of a real email sender. Instead of sending emails, it logs confirmation links and password reset codes as structured log entries, which are accessible from the Structured tab in the Aspire dashboard. For production use, replace it with a real IEmailSender<ApplicationUser> implementation.

Uses:

clientapp

An Expo frontend supporting web, iOS, and Android that authenticates users via the ASP.NET Core Identity API endpoints.

Note

On web, HTTP-only cookies are used instead of tokens as a security best practice. On native, tokens are persisted via expo-secure-store.

Features:

  • 👤 Sign up and sign in
  • 📧 Email confirmation
  • 🔑 Forgot password and password reset
  • 📱 Two-factor authentication (TOTP) setup and sign-in
  • 🛡️ Recovery code management
  • ✏️ Change email and change password
  • 🔒 Protected routes

Uses:

About

Example project using Aspire with an Expo (React Native) frontend and an ASP.NET Core backend that uses ASP.NET Core Identity for authentication backed by PostgreSQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors