omofolarin / actix-web-oauth2

Actix web Oauth2 examples

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actix web OAuth2 examples

This repo contains examples for using OAuth2 authentication in an Actix Web application.

Current versions:

Running the examples

Create credentials with origin URL http://127.0.0.1:5000 and redirect URL http://127.0.0.1:5000/auth

OAuth2 login with Google

Create credentials at https://console.developers.google.com/apis/credentials

GOOGLE_CLIENT_ID=xxx GOOGLE_CLIENT_SECRET=yyy cargo run --bin google
x-www-browser http://127.0.0.1:5000/

OAuth2 login with Gitlab

Create credentials at https://gitlab.example.com/admin/applications

GITLAB_SERVER=gitlab.example.com GITLAB_CLIENT_ID=xxx GITLAB_CLIENT_SECRET=yyy cargo run --bin gitlab
x-www-browser http://127.0.0.1:5000/

About

Actix web Oauth2 examples

License:MIT License


Languages

Language:Rust 100.0%