# FailedLogin

`type` in `plugin-oauth` · v0.1.0

<https://seedcord.org/docs/packages/plugin-oauth/0.1.0/types/failed-login>

A login that didn't finish.

- `denied`: the visitor pressed cancel on Discord's consent screen, or Discord refused the request.
 `error` is Discord's reason, like `access_denied`.
- `invalid`: the login link expired, the page was reloaded, or the visit didn't come from a login that
 this browser started.
- `unlisted`: the login link requested `scopes` that aren't in the client's `extraScopes`. The visitor
 never reached Discord.
- `failed`: trading the code for the user's tokens threw. Discord was down, it refused the client
 secret, or the store didn't take the tokens. `error` is what was thrown.

## Declaration

```ts
type FailedLogin =
    | { kind: "denied"; error: string }
    | { kind: "invalid" }
    | { kind: "unlisted"; scopes: string[] }
    | { kind: "failed"; error: unknown };
```
