Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Next Auth | 16,838 | 21 | 73 | 14 hours ago | 567 | August 01, 2022 | 245 | isc | TypeScript | |
Authentication for the Web. | ||||||||||
Satellizer | 8,017 | 284 | 6 | 4 years ago | 56 | August 30, 2016 | 287 | mit | TypeScript | |
Token-based AngularJS Authentication | ||||||||||
Octokit.rb | 3,761 | 36,226 | 665 | 4 days ago | 129 | September 14, 2022 | 60 | mit | Ruby | |
Ruby toolkit for the GitHub API | ||||||||||
Devise_token_auth | 3,446 | 1,516 | 13 | a month ago | 112 | July 19, 2021 | 188 | wtfpl | Ruby | |
Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth. | ||||||||||
Jwt Spring Security Demo | 2,534 | 3 years ago | 2 | mit | Java | |||||
A demo for using JWT (Json Web Token) with Spring Security and Spring Boot 2 | ||||||||||
Fosite | 2,061 | 50 | 64 | a month ago | 278 | April 17, 2022 | 31 | apache-2.0 | Go | |
Extensible security first OAuth 2.0 and OpenID Connect SDK for Go. | ||||||||||
Auth Module | 1,848 | 139 | 32 | 2 months ago | 51 | April 16, 2020 | 195 | mit | TypeScript | |
Zero-boilerplate authentication support for Nuxt.js! | ||||||||||
Ng Token Auth | 1,828 | a year ago | 2 | September 19, 2015 | 117 | wtfpl | CoffeeScript | |||
Token based authentication module for angular.js. | ||||||||||
Twython | 1,786 | 1,128 | 28 | 2 years ago | 61 | July 16, 2021 | 21 | mit | Python | |
Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs. | ||||||||||
Pushy | 1,629 | 10 | 7 | a month ago | 19 | October 13, 2019 | 21 | mit | Java | |
A Java library for sending APNs (iOS/macOS/Safari) push notifications |
This repo demonstrates some ways you might build authentication and authorization logic into your GraphQL API. GraphQL itself does not prescribe any particular way to do auth and those details are left up to the developer.
The approaches here may or may not be suitable for your own implementation.
This GraphQL server uses JSON Web Tokens (JWT) for authorization. You will need some tokens to begin with to test the API. Here are a few you can use:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJncmFwaHFsLXRlc3Qtc2VydmVyIiwiaWF0IjoxNTA5MDQxMTE3LCJleHAiOjE1NDA1NzcxMTcsImF1ZCI6ImdyYXBocWwtdGVzdC1hcGkiLCJzdWIiOiIxMjMifQ.tTRbNKT58UqRMqMkf8cLenRZ0qvf15mUl6N6dWyn_Wo
write:articles
ScopeeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJncmFwaHFsLXRlc3Qtc2VydmVyIiwiaWF0IjoxNTA5MDQxMTE3LCJleHAiOjE1NDA1NzcxMTcsImF1ZCI6ImdyYXBocWwtdGVzdC1hcGkiLCJzdWIiOiIxMjMiLCJzY29wZSI6IndyaXRlOmFydGljbGVzIn0.mupYodqVggdF1fZaiyVdfOGLwY_R3KISGBTCJ7hhH5U
The sub
claim in these tokens is 123
which maps to the same author ID in the supplied data.
The secret key for these tokens is found in the .env
file. THIS SECRET KEY IS TERRIBLY WEAK, DO NOT USE IT IN PRODUCTION.
To test the API, attach one of the tokens to the Authorization
header in your requests using the Bearer
scheme. For example:
Authorization: Bearer eyJ0...
MIT