Comments (3)
I once made a POC of this sort of thing with Node.js. I'd be willing to share that code if interested.
from edge.
@nprail sure, anything would help. There's probably a lot that won't work since we can't use the Crypto API from node.js (I'm assuming we'll have to sign some JWTs for Google).
But we already have the sjcl
package which can probably do a lot of what we need. Until we have a more complete Crypto API (from the Web API.)
from edge.
@jeromegn Here is the code: https://github.com/nprail/static-auth-poc
It was a POC for improving auth on Surge.sh so some things would have to be modified. For example, it doesn't do Google login. It just has a static username and password in it. I think the login server piece of the POC can be completely replaced by an OAuth provider.
This is the basic flow:
- The user goes to a password protected site (e.g. protected.example.com)
- The user is redirected to the Login Server and logs in (which redirects to Google or any other provider for login)
- The user is redirected back to protected.example.com with the new JWT token stored in a cookie
- The JWT token is then used to verify that the user has access to the site
from edge.
Related Issues (20)
- Add Squarespace backend
- AWS S3 Backend type
- Auto-webp middleware
- More conventional setup process HOT 3
- Move staticServer from superfly/fly
- load balancer
- Add Dropbox backend HOT 13
- Add Typeform backend HOT 3
- Custom error middleware
- Make proxied backends retry on exceptions
- Analytics middleware HOT 1
- Starter app is broken
- Auth0 middleware HOT 4
- Add "What is a CDN" and "Why we built this" to readme
- Middleware: Lazy Loading Images HOT 1
- queryString problem in `proxy` implementation
- current `tsconfig.json` throws errors HOT 2
- Middleware: redirect www -> non-www host
- Initial Release (01/09)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edge.