Note: This project is currently WIP.
I want to thank thanipro for his example repository which helped greatly.
This project is an open source template for a rust Axum project with Google OAuth authentication setup.
In my effort to learn rust I found there isn't many examples of a full E2E authentication setup using Axum for the Google OAuth flow. I have created this project as an example for any future developers wanting to integrate with Google OAuth.
This repository includes:
- Google OAuth integration with auth middleware to validate and refresh access tokens.
- Repository / Service Layer separation.
- Logging.
- A testing setup that can be built upon.
- Git workflow to build & test the application automatically.
- Clone the project.
- Rename
.env.example
to.env
and populate with your DB and Google OAuth credentials:- To setup your Google OAuth client See here.
- Install
sqlx-cli
and runsqlx migrate run
. - Run
cargo build
and thencargo run
.