Giter VIP home page Giter VIP logo

wpcodevo / google-github-oauth2-rust Goto Github PK

View Code? Open in Web Editor NEW
30.0 1.0 6.0 44 KB

This article will teach you how to integrate Google OAuth2 into your Rust application, all without relying on third-party OAuth crates such as https://crates.io/crates/oauth2.

Home Page: https://codevoweb.com/how-to-implement-google-oauth2-in-rust/

Shell 1.54% Makefile 1.54% Rust 96.92%
actix-web api google-oauth google-oauth2 oauth oauth2 rest-api rust rust-api rust-application

google-github-oauth2-rust's Introduction

How to Implement Google OAuth2 in Rust

This article will teach you how to integrate Google OAuth2 into your Rust application, all without relying on third-party OAuth crates such as https://crates.io/crates/oauth2. We'll be utilizing the Actix-Web HTTP framework, known for its high performance, to power the API. Additionally, we'll store data in a centralized in-memory database.

How to Implement Google OAuth2 in Rust

Topics Covered

  • Run the Rust Google OAuth2 Project
  • Run the Rust OAuth2 API with a React.js App
  • Setup the Rust Project with Cargo
  • Obtain the Google OAuth2 Credentials
  • Load the Environment Variables
  • Create an In-memory Database
  • Create the Response Structs
  • Get the Google OAuth2 Access Token and User Info
  • Create the Actix-Web Route Handlers
    • Register User Actix-Web Route Handler
    • Login User Actix-Web Route Handler
    • Implement the Google OAuth2
    • Logout User Actix-Web Route Handler
    • Retrieve the Authenticated User
    • Merge the Actix-Web Route Handlers
  • Register the Actix-Web Config and Add CORS
  • Test the Rust Google OAuth Flow
    • Register User
    • Login User
    • Authenticate with Google OAuth
    • Get Profile Information

Read the entire article here: https://codevoweb.com/how-to-implement-google-oauth2-in-rust/

google-github-oauth2-rust's People

Contributors

wpcodevo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.