michaelawyu / auth-server-sample Goto Github PK
View Code? Open in Web Editor NEWSamples for Understanding OAuth2 and Building a Basic Authorization Server of Your Own Beginner's Guide
License: Apache License 2.0
Samples for Understanding OAuth2 and Building a Basic Authorization Server of Your Own Beginner's Guide
License: Apache License 2.0
Hi @michaelawyu ,
Running the command "python AC_client.py" throws an error ModuleNotFoundError: No module named 'requests'.
How do I resolve this?
Thanks
How i can setup oauth2 on our server, after that I can use this sample code.
I am going to create basic authentication with use of oauth2.0. Please suggest the step which i need to do here and some integration url and command
Deploy command should be --trigger-http and --runtime=nodejs14 (or swap 14 for more recent version). When deploying need to agree to authorised access to the function.
The property with ac-enabled should have client-id as sample-ac-client (not a repeat of sample-ropc-client) and have the client-secret property set
The sample-acpkce-client has https://www.google.com as its client-secret value instead of sample-client-secret.
The POST commands should have the url in double quotes (at least for windows)
PKCE example: Verifier is mis-spelt as verfier.
Resource Owner example: username=sample-user not sample-username.
PUG file needs updating with GCP region and project values before deployment.
To generate pem key files you can use openssl on command line as:
openssl genrsa -aes256 -out priv.pem 4096
openssl rsa -in priv.pem -pubout > public.pem
openssl rsa -in priv.pem -out private.pem
Last step is needed to remove passphrase which will cause tutorial to fail.
I found this code after reading Understanding OAuth2 and Deploying a Basic Authorization Service to Cloud Functions tutorial. I wanted to bring two items to your attention with the tutorial:
You write that implicit and client credentials are reserved for special clients, and then also reference implicit and client credentials as the flows that "other clients" can use. Is this a typo? Should it instead be something like:
Highly trusted apps -> Resource Owner Password Credentials
Less trusted apps -> Authorization Code
Thank you for the tutorial.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.