11ty / demo-eleventy-serverless-oauth Goto Github PK
View Code? Open in Web Editor NEWA demo project using OAuth to secure some of your Eleventy Serverless routes.
Home Page: https://demo-eleventy-serverless-oauth.netlify.app/
A demo project using OAuth to secure some of your Eleventy Serverless routes.
Home Page: https://demo-eleventy-serverless-oauth.netlify.app/
I noticed that npm run dev
generates the following output:
[Browsersync] Access URLs:
-------------------------------
Local: http://localhost:8080
External: http://false:8080
-------------------------------
[Browsersync] Serving files from: _site
┌─────────────────────────────────────────────────┐
│ │
│ ◈ Server now ready on http://localhost:8888 │
│ │
└─────────────────────────────────────────────────┘
I thought it was odd that the two local URLs had different ports. I tried specifying other ports in package.json
by adding --port=8081
to the build
and start
scripts, but then got 404 errors for /.netlify/functions/auth-before
. It looks like 8888
is hard-coded here:
Should the demo project be able to work with ports other than 8888
? Or is this the mismatch a requirement for Netlify functions?
Thanks! Sorry for not attempting a PR, I'm still a bit new to Eleventy.
I’d love to see it on the API Services https://www.11ty.dev/docs/api-services/
But it might be better bundled with the Serverless plugin, because of the tight coupling here https://github.com/11ty/demo-eleventy-serverless-oauth/blob/main/netlify/functions/dynamic/index.js
Could you please add a license file for this repository, if that aligns with your intended use for it? Thank you!
STACKEXCHANGE_OAUTH_CLIENT_ID
and STACKEXCHANGE_OAUTH_CLIENT_SECRET
to the corresponding site on Netlify.providers.js
and auth.js
in netlify/functions/Utils
https://stackoverflow.com
for authentication and https://api.stackexchange.com
to get the user data.select
so the user can select the source of the site user profile. Another approach might be to show the user data from the Stack Exchange network profile instead but this should be told to the user.Hello. And how to run all this on your own hosting? As far as I understand, the netlify functions will not work
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.