jerriepelser-blog / google-gsuite-oauth Goto Github PK
View Code? Open in Web Editor NEWDemonstrates how to limit users to sign in with G Suite domain
License: MIT License
Demonstrates how to limit users to sign in with G Suite domain
License: MIT License
I've read your blog about the code and it is a great write up.
I'm currently rebuilding my .NET v4.7 + Angular application to .NET Core v3.1 and Blazor.
I'm trying your code to login, but I'm not familiar with MVC and I'm having a hard-time getting the controllers for 'Limiting users to your Organizational domain' to work since .NET Core is handling most of it internally now.
Do you have plans of creating a similar example but now using Razor pages and .Net Core v3+?
Update
I managed to get it working now. But are struggling with showing the profile picture in the login page. I see I get it back from Google in OnCreatingTicket
but can't add it as a claim to the user.
Jey Jerrie,
All works great, just this one thing bugs me.
When I log in with a different domain, the GoogleAuthenticationException throws in Visual Studio, but it doesn't take me to the custom Error page. It just shows the good old stacktrace in the browser. When stepping with the debugger in the HomeController it goes through the Error method, creates a ViewModel and should return the Error view, but it just displays the StackTrace.
Any ideas?
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.