Skip to content

Androz2091/deno-diswho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DisWho

Deno port of Androz2091/diswho featuring reCaptcha protection, JWT authentication and return URL.

Usage

Login at /. If provided, returnUrl query param will be redirected to, with a diswhoJwt query param.

Then, make requests to /user/{userId} using GET method and Bearer YOUR_JWT_HERE as authorization header, which will directly return the untransformed response from https://discord.com/api/v8/users/{userId}.

This API is useful for web applications so you can request this API instead of the Discord one (and therefore, you don't need your users to provide a discord bot token).

Installation

Run using the following command :

PORT=3050 CAPTCHA_PUBLIC_KEY="" CAPTCHA_PRIVATE_KEY="" DISCORD_SECRET="" deno run --allow-env --allow-net --allow-read mod.js

Other optional parameters are SESSION_DURATION in milliseconds (900000 by default i.e. 15 mins) and JWT_SECRET (auto-generated by default i.e. any restart will invalidate all active tokens).


Copyright (c) 2021 KaKi87

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Deno port of Diswho

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published