Skip to content

Commit

Permalink
feat: createCallbackAuth(callback) is now `createCallbackAuth({ cal…
Browse files Browse the repository at this point in the history
…lback })` (#3)
  • Loading branch information
gr2m authored Nov 23, 2020
1 parent 9ca27db commit 5771383
Show file tree
Hide file tree
Showing 6 changed files with 359 additions and 451 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const { createCallbackAuth } = require("@octokit/auth-callback");
```js
let token;

const auth = createCallbackAuth(() => token);
const auth = createCallbackAuth({ callback: () => token });
await auth();
// {
// type: 'unauthenticated'
Expand All @@ -58,9 +58,9 @@ await auth();
// }
```

## `createCallbackAuth(callback)`
## `createCallbackAuth(options)`

The `createCallbackAuth` method accepts a single `callback` parameter
The `createCallbackAuth` method accepts a single `options` parameter

<table width="100%">
<thead align=left>
Expand All @@ -79,10 +79,10 @@ The `createCallbackAuth` method accepts a single `callback` parameter
<tbody align=left valign=top>
<tr>
<th>
<code>callback</code>
<code>options.callback</code>
</th>
<th>
<code>string</code>
<code>function</code>
</th>
<td>
<strong>Required</strong>. A method that returns or resolves with a token string.
Expand Down
Loading

0 comments on commit 5771383

Please sign in to comment.