Skip to content

Commit 8976945

Browse files
committed
feat(typescript): export OAuthAppAuthentication, GitHubAppAuthentication, GitHubAppAuthenticationWithExpiration
1 parent d5a6229 commit 8976945

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ Browsers
4444

4545
`@octokit/oauth-methods` is not meant for browser usage.
4646

47+
Some of the methods will work, but others do not have CORS headers enabled and will fail (`exchangeWebFlowCode()`, `createDeviceCode()`, `exchangeDeviceCode()`, `refreshToken()`). Also the Client Secret should not be exposed to clients as it can be used for a [Person-in-the-middle attack](https://en.wikipedia.org/wiki/Person-in-the-middle_attack).
48+
4749
</td></tr>
4850
<tr><th>
4951

@@ -1559,6 +1561,16 @@ Note that the `clientSecret` may not be set when using [`exchangeDeviceCode()`](
15591561
</tbody>
15601562
</table>
15611563

1564+
## Types
1565+
1566+
```ts
1567+
import {
1568+
OAuthAppAuthentication,
1569+
GitHubAppAuthentication,
1570+
GitHubAppAuthenticationWithExpiration,
1571+
} from "@octokit/oauth-methods";
1572+
```
1573+
15621574
## Contributing
15631575

15641576
See [CONTRIBUTING.md](CONTRIBUTING.md)

src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ export { scopeToken } from "./scope-token";
99
export { resetToken } from "./reset-token";
1010
export { deleteToken } from "./delete-token";
1111
export { deleteAuthorization } from "./delete-authorization";
12+
export {
13+
OAuthAppAuthentication,
14+
GitHubAppAuthentication,
15+
GitHubAppAuthenticationWithExpiration,
16+
} from "./types";

0 commit comments

Comments
 (0)