Skip to content

Commit e6665cc

Browse files
committed
refactor(auth): migrate to octokit/oauth-method library
Signed-off-by: Adam Setch <adam.setch@outlook.com>
1 parent f6f5ca0 commit e6665cc

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/renderer/context/App.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,8 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
406406
}, [auth]);
407407

408408
/**
409+
* Login with GitHub App.
410+
*
409411
* Note: although we call this "Login with GitHub App", this function actually
410412
* authenticates via a predefined "Gitify" GitHub OAuth App.
411413
*/
@@ -420,7 +422,7 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
420422
}, [auth, persistAuth]);
421423

422424
/**
423-
* Login with custom GitHub OAuth App
425+
* Login with custom GitHub OAuth App.
424426
*/
425427
const loginWithOAuthApp = useCallback(
426428
async (data: LoginOAuthAppOptions) => {
@@ -439,6 +441,9 @@ export const AppProvider = ({ children }: { children: ReactNode }) => {
439441
[auth, persistAuth],
440442
);
441443

444+
/**
445+
* Login with Personal Access Token (PAT).
446+
*/
442447
const loginWithPersonalAccessToken = useCallback(
443448
async ({ token, hostname }: LoginPersonalAccessTokenOptions) => {
444449
const encryptedToken = (await encryptValue(token)) as Token;

0 commit comments

Comments
 (0)