Socket
Socket
Sign inDemoInstall

arctic

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arctic - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

4

dist/index.d.ts

@@ -5,3 +5,3 @@ export { Apple } from "./providers/apple.js";

export { Facebook } from "./providers/facebook.js";
export { Github } from "./providers/github.js";
export { GitHub } from "./providers/github.js";
export { Google } from "./providers/google.js";

@@ -16,3 +16,3 @@ export { Line } from "./providers/line.js";

export type { FacebookTokens, FacebookUser } from "./providers/facebook.js";
export type { GithubTokens, GithubUser, PrivateGithubUser, PublicGithubUser } from "./providers/github.js";
export type { GitHubTokens, GitHubUser, PrivateGitHubUser, PublicGitHubUser } from "./providers/github.js";
export type { GoogleRefreshedTokens, GoogleTokens, GoogleUser } from "./providers/google.js";

@@ -19,0 +19,0 @@ export type { LineIdTokenClaims, LineRefreshedTokens, LineTokens, LineUser } from "./providers/line.js";

@@ -5,3 +5,3 @@ export { Apple } from "./providers/apple.js";

export { Facebook } from "./providers/facebook.js";
export { Github } from "./providers/github.js";
export { GitHub } from "./providers/github.js";
export { Google } from "./providers/google.js";

@@ -8,0 +8,0 @@ export { Line } from "./providers/line.js";

@@ -1,2 +0,2 @@

export declare class Github {
export declare class GitHub {
private controller;

@@ -10,10 +10,10 @@ private scope;

createAuthorizationURL(state: string): Promise<URL>;
validateAuthorizationCode(code: string): Promise<GithubTokens>;
getUser(accessToken: string): Promise<GithubUser>;
validateAuthorizationCode(code: string): Promise<GitHubTokens>;
getUser(accessToken: string): Promise<GitHubUser>;
}
export interface GithubTokens {
export interface GitHubTokens {
accessToken: string;
}
export type GithubUser = PublicGithubUser | PrivateGithubUser;
export interface PublicGithubUser {
export type GitHubUser = PublicGitHubUser | PrivateGitHubUser;
export interface PublicGitHubUser {
avatar_url: string;

@@ -59,3 +59,3 @@ bio: string | null;

}
export interface PrivateGithubUser extends PublicGithubUser {
export interface PrivateGitHubUser extends PublicGitHubUser {
collaborators: number;

@@ -62,0 +62,0 @@ disk_usage: number;

import { OAuth2Controller } from "oslo/oauth2";
const authorizeEndpoint = "https://github.com/login/oauth/authorize";
const tokenEndpoint = "https://github.com/login/oauth/access_token";
export class Github {
export class GitHub {
controller;

@@ -6,0 +6,0 @@ scope;

{
"name": "arctic",
"type": "module",
"version": "0.2.0",
"version": "0.3.0",
"description": "A collection of auth-related utilities",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

@@ -15,3 +15,3 @@ # `arctic`

- [Facebook](#oauth-20)
- [Github](#oauth-20)
- [GitHub](#oauth-20)
- [Google](#oauth-20)

@@ -28,5 +28,5 @@ - [LINE](#oauth-20)

```ts
import { Github } from "arctic";
import { GitHub } from "arctic";
const github = new Github(clientId, clientSecret, {
const github = new GitHub(clientId, clientSecret, {
scope: ["user:email"] // etc

@@ -43,3 +43,3 @@ });

const github = new Github(clientId, clientSecret, redirectURI);
const github = new GitHub(clientId, clientSecret, redirectURI);
```

@@ -107,5 +107,5 @@

```ts
import { Github } from "arctic";
import { GitHub } from "arctic";
const github = new Github(clientId, clientSecret, {
const github = new GitHub(clientId, clientSecret, {
scope: ["user:email"] // etc

@@ -122,3 +122,3 @@ });

const github = new Github(clientId, clientSecret, redirectURI);
const github = new GitHub(clientId, clientSecret, redirectURI);
```

@@ -125,0 +125,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc