Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ See [GitHub’s Developer Guide for the OAuth App web application flow](https://
- [For GitHub Apps](#for-github-apps)
- [Options](#options)
- [Result](#result)
- [Types](#types)
- [License](#license)

<!-- tocstop -->
Expand Down Expand Up @@ -263,6 +264,16 @@ Returns an array of strings. Returns <code>options.scopes</code> if it was set a
</tbody>
</table>

## Types

```ts
import { ClientType, Options, Result } from "@octokit/oauth-authorization-url";
```

- `ClientType` is a union of `"oauth-app"` and `"github-app"`
- `Options<"oauth-app">` returns types for OAuth Apps Options. `Options<"github-app">` returns types for GitHub Apps Options.
- `Result<"oauth-app">` returns types for OAuth Apps Result object. `Result<"github-app">` returns types for GitHub Apps Result object.

## License

[MIT](LICENSE)
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ClientType, Options, Result } from "./types";
export { ClientType, Options, Result } from "./types";

export function oauthAuthorizationUrl<
TClientType extends ClientType = "oauth-app"
Expand Down