Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/maxhu08/parcel-discord-auth-token

🙌 quick to setup template w/ parcel & discord oauth (uses tokens)
https://github.com/maxhu08/parcel-discord-auth-token

auth discord parcel tailwindcss typescript

Last synced: about 2 months ago
JSON representation

🙌 quick to setup template w/ parcel & discord oauth (uses tokens)

Awesome Lists containing this project

README

        

# parcel-discord-auth-token

simple template that has discord oauth all setup, based off of my [simple-parcel-template](https://github.com/maxhu08/simple-parcel-template)

this template uses `response_type=token` which is simpler to setup than `response_type=code`

## getting started

run these commands:

```shell
# clone
git clone https://github.com/maxhu08/parcel-discord-auth-token
cd parcel-discord-auth-token

# remove git info
rm -rf .git

# install dependencies
bun i
```

go to the discord developer portal [here](https://discord.com/developers/applications)

create a new application

go to oauth2 > add redirect & set it to `http://localhost:1234/auth/discord`

go to auth2 url generator below it > check identify > select redirect url to the one you set earlier > copy generated url

then set the `a` tag with id `login`, replace the href value of `#` with the url from the discord developer portal, but replace `response_type=code` with `response_type=token`

that's it !

to run:

```shell
# development mode
bun dev

# production mode
bun build
```

then go to the link it gives, which will probably be `localhost:1234`

![demo-1](./screenshots/1.png)

![demo-2](./screenshots/2.png)