Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Awesome Go | 108,423 | a day ago | 35 | April 19, 2021 | 171 | mit | Go | |||
A curated list of awesome Go frameworks, libraries and software | ||||||||||
Hackathon Starter | 34,339 | 2 | 4 days ago | 7 | December 09, 2020 | 11 | mit | JavaScript | ||
A boilerplate for Node.js web applications | ||||||||||
Passport | 21,797 | 81,272 | 4,389 | 2 days ago | 32 | May 20, 2022 | 375 | mit | JavaScript | |
Simple, unobtrusive authentication for Node.js. | ||||||||||
Next Auth | 18,750 | 21 | 226 | 19 hours ago | 650 | July 25, 2023 | 304 | isc | TypeScript | |
Authentication for the Web. | ||||||||||
Casbin | 15,651 | 638 | 19 days ago | 240 | July 28, 2023 | 26 | apache-2.0 | Go | ||
An authorization library that supports access control models like ACL, RBAC, ABAC in Golang: https://discord.gg/S5UjpzGZjN | ||||||||||
Cas | 10,324 | 6 | 291 | a day ago | 192 | July 21, 2023 | 8 | apache-2.0 | Java | |
Apereo CAS - Identity & Single Sign On for all earthlings and beyond. | ||||||||||
Supertokens Core | 10,055 | 19 hours ago | 101 | other | Java | |||||
Open source alternative to Auth0 / Firebase Auth / AWS Cognito | ||||||||||
Springcloud | 8,298 | 14 days ago | 56 | apache-2.0 | Java | |||||
基于SpringCloud2.1的微服务开发脚手架,整合了spring-security-oauth2、nacos、feign、sentinel、springcloud-gateway等。服务治理方面引入elasticsearch、skywalking、springboot-admin、zipkin等,让项目开发快速进入业务开发,而不需过多时间花费在架构搭建上。持续更新中 | ||||||||||
Django Allauth | 8,293 | 5,160 | 126 | 2 days ago | 70 | March 31, 2023 | 102 | mit | Python | |
Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication. | ||||||||||
Satellizer | 8,017 | 284 | 7 | 4 years ago | 56 | August 30, 2016 | 287 | mit | TypeScript | |
Token-based AngularJS Authentication |
An open-source auth providers for Cloudflare workers
Step 1: Install the dependencies
npm install worker-auth-providers
Step 2: Import the dependencies
import {
github, google,
twilio, facebook, discord,
spotify
} from "worker-auth-providers";
Step 3: Redirect users
const githubLoginUrl = await github.redirect({
options: {
clientId,
},
});
return {
status: 302,
headers: {
location: githubLoginUrl,
},
};
// or send otp
const res = await awsSNS.send({
options: {
phone,
region: 'ap-south-1',
kvProvider: WORKER_AUTH_PROVIDERS_STORE,
},
})
Step 4: Get user
const { user: providerUser, tokens } = await github.users({
options: { clientSecret, clientId },
request,
});
console.log("[providerUser]", providerUser);
// or verify otp
const res = await awsSNS.verify({
options: {
phone,
otp,
kvProvider: WORKER_AUTH_PROVIDERS_STORE,
secret: 'eyJhbGciOiJIUzI1NiJ9.ew0KICAic3ViIjogIjE2Mjc4MTE1MDEiLA0KICAibmFtZSI6ICJoYWFsLmluIiwNCiAgImlhdCI6ICIwMTA4MjAyMCINCn0.aNr18szvBz3Db3HAsJ-2KHYbnnHwHfK65CiZ_AWwpc0',
},
})
Coming soon
Contributions are always welcome! See contributing.md for ways to get started. Please adhere to this project's code of conduct.
##FAQs
Use cookie. Setting a cookie to indicate that theyre authorized for future requests
const cookieKey = "worker-auth-providers"
const persistAuth = async exchange => {
const date = new Date() date.setDate(date.getDate() + 1)
const headers = {
Location: "/",
"Set-cookie": `${cookieKey}=${id}; Secure; HttpOnly; SameSite=Lax; Expires=${date.toUTCString()}`,
}
return { headers, status: 302 }
}
Easy, delete the cookie
export const logout = event => {
const cookieHeader = event.request.headers.get('Cookie')
if (cookieHeader && cookieHeader.includes(cookieKey)) {
return {
headers: {
'Set-cookie': `${cookieKey}=""; HttpOnly; Secure; SameSite=Lax;`,
},
}
}
return {}
}
If you have any feedback, please reach out to me at [email protected]