{"id":21800983,"url":"https://github.com/wpcodevo/rust-user-signup-forgot-password-email","last_synced_at":"2025-04-13T18:23:26.273Z","repository":{"id":177558190,"uuid":"660544309","full_name":"wpcodevo/rust-user-signup-forgot-password-email","owner":"wpcodevo","description":"In this article, we will explore the process of building a REST API in Rust with features like user registration, email verification, login, and logout capabilities. Our API will be powered by the high-performance Axum framework and will utilize the SQLx toolkit to store data in a SQLite database.","archived":false,"fork":false,"pushed_at":"2023-12-27T09:05:50.000Z","size":86,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T09:11:34.692Z","etag":null,"topics":["axum","axum-framework","axum-server","restful-api","rust","rust-api","rust-lang","signin","signup","sqlite","sqlx","sqlx-cli"],"latest_commit_sha":null,"homepage":"https://codevoweb.com/rust-api-user-registration-and-email-verification/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpcodevo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-06-30T08:45:09.000Z","updated_at":"2024-12-23T17:38:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"975db7e0-8c3f-4e25-8383-cb52dec859d6","html_url":"https://github.com/wpcodevo/rust-user-signup-forgot-password-email","commit_stats":null,"previous_names":["wpcodevo/rust-user-signup-email-verification","wpcodevo/rust-user-signup-forgot-password-email"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-user-signup-forgot-password-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-user-signup-forgot-password-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-user-signup-forgot-password-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpcodevo%2Frust-user-signup-forgot-password-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpcodevo","download_url":"https://codeload.github.com/wpcodevo/rust-user-signup-forgot-password-email/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248759143,"owners_count":21157098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","axum-framework","axum-server","restful-api","rust","rust-api","rust-lang","signin","signup","sqlite","sqlx","sqlx-cli"],"created_at":"2024-11-27T11:15:31.188Z","updated_at":"2025-04-13T18:23:26.250Z","avatar_url":"https://github.com/wpcodevo.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 1. Rust API - User Registration and Email Verification\n\nIn this article, we will explore the process of building a REST API in Rust with features like user registration, email verification, login, and logout capabilities. Our API will be powered by the high-performance Axum framework and will utilize the SQLx toolkit to store data in a SQLite database. It's worth noting that while we use SQLite in this tutorial, you can easily adapt the code to work with other databases supported by SQLx.\n\n![Rust API - User Registration and Email Verification](https://codevoweb.com/wp-content/uploads/2023/07/Rust-API-User-Registration-and-Email-Verification.webp)\n\n### Topics Covered\n\n- Running the Rust API on Your Machine\n- Running the Rust API with a Frontend Application\n- Setting up the Rust Project\n- Creating the HTML Email Templates\n    - Creating the Base Layout\n    - Creating the CSS Styles\n    - Creating the Email Verification Template\n- Handling Database Migrations\n    - Starting with the Initial Migrations\n    - Adding More Fields\n- Creating the Database and Request Models\n- Utility Functions for Sending the Emails\n    - Getting Your SMTP Provider Credentials\n    - Loading the Environment Variables\n    - Creating a Struct with Methods for Sending the Emails\n- Creating the API Response Models\n- Creating the JWT Middleware Guard\n- Creating the API Endpoint Handlers\n    - Health Checker Handler\n    - Register User with Email Verification Handler\n    - Login User Handler\n    - Verify Email Verification Token Handler\n    - Logout User Handler\n    - Retrieve Authentication User Credentials Handler\n    - The Complete Code of the API Endpoint Handlers\n- Creating the API Endpoints\n- Registering the API Router\n- Conclusion\n\n\nRead the entire article here: [https://codevoweb.com/rust-api-user-registration-and-email-verification/](https://codevoweb.com/rust-api-user-registration-and-email-verification/)\n\n\n## 2. Rust API - Forgot/Reset Password with Emails\n\nIn this guide, you will learn how to add a forgot/reset password feature to a Rust API. The API is built on top of the high-performance Axum framework and utilizes the SQLx crate for seamless integration with a database.\n\n![Rust API - Forgot/Reset Password with Emails](https://codevoweb.com/wp-content/uploads/2023/07/Rust-API-Forgot-Reset-Password-with-Emails.webp)\n\n### Topics Covered\n\n- Running the Rust API Project Locally\n- Running the Rust API with a Frontend App\n- Setting up the Rust Project\n- Generating the Password Reset HTML Email Template\n- Sending the Emails via SMTP\n- Performing Database Migrations\n- Adding More Fields to the Database Model\n- Creating the API Endpoint Handlers\n    - Creating the Forgot Password Handler\n    - Creating the Reset Password Handler\n    - The Complete Code of the Route Handlers\n- Registering the Forgot/Reset Password Routes\n- Registering the Axum Router and Configuring the Server\n- Conclusion\n  \nRead the entire article here: [https://codevoweb.com/rust-api-forgot-reset-password-with-emails/](https://codevoweb.com/rust-api-forgot-reset-password-with-emails/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Frust-user-signup-forgot-password-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpcodevo%2Frust-user-signup-forgot-password-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpcodevo%2Frust-user-signup-forgot-password-email/lists"}