Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: use jsr:@cmd-johnson/oauth2-client #334

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 2 additions & 4 deletions deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"exports": "./mod.ts",
"lock": false,
"imports": {
"@cmd-johnson/oauth2-client": "jsr:@cmd-johnson/oauth2-client@^2.0.0",
"@std/assert": "jsr:@std/assert@^1.0.6",
"@std/datetime": "jsr:@std/datetime@^0.225.2",
"@std/fs": "jsr:@std/fs@^1.0.4",
"@std/http": "jsr:@std/http@^1.0.8",
"@std/testing": "jsr:@std/testing@^1.0.3",
"https://deno.land/": "./vendor/deno.land/",
"jsr:@deno/kv-oauth": "./mod.ts",
"oauth2_client/": "https://deno.land/x/oauth2_client@v1.0.2/"
"@std/testing": "jsr:@std/testing@^1.0.3"
},
"tasks": {
"demo": "deno run --allow-net --env --allow-env --unstable-kv --watch demo.ts",
Expand Down
2 changes: 1 addition & 1 deletion lib/_test_utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import { assert, assertEquals } from "@std/assert";
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { STATUS_CODE } from "@std/http";

import type { OAuthSession } from "./_kv.ts";
Expand Down
2 changes: 1 addition & 1 deletion lib/create_auth0_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_aws_cognito_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/create_azure_ad_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand All @@ -12,7 +12,7 @@ import { getRequiredEnv } from "./get_required_env.ts";
* 4. `AZURE_AD_TENANT_ID`
*
* @example Usage
* ```ts
* ```ts ignore
* import { createAzureAdOAuthConfig } from "jsr:@deno/kv-oauth";
*
* const oauthConfig = createAzureAdOAuthConfig({
Expand Down
2 changes: 1 addition & 1 deletion lib/create_azure_adb2c_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_clerk_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_discord_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_dropbox_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_facebook_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_github_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_gitlab_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_google_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
OAuth2Client,
type OAuth2ClientConfig,
type Tokens,
} from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
} from "@cmd-johnson/oauth2-client";
import { SECOND } from "@std/datetime";
import { type Cookie, deleteCookie, getCookies, setCookie } from "@std/http";
import {
Expand Down
2 changes: 1 addition & 1 deletion lib/create_logto_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_notion_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_okta_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_patreon_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_slack_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_spotify_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/create_twitter_oauth_config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
import type { OAuth2ClientConfig } from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
import type { OAuth2ClientConfig } from "@cmd-johnson/oauth2-client";
import { getRequiredEnv } from "./get_required_env.ts";

/**
Expand Down
5 changes: 1 addition & 4 deletions lib/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Copyright 2023-2024 the Deno authors. All rights reserved. MIT license.
export type { Cookie } from "@std/http";
export type {
OAuth2ClientConfig,
Tokens,
} from "https://deno.land/x/oauth2_client@v1.0.2/mod.ts";
export type { OAuth2ClientConfig, Tokens } from "@cmd-johnson/oauth2-client";
127 changes: 0 additions & 127 deletions vendor/deno.land/std@0.161.0/encoding/base64.ts

This file was deleted.

37 changes: 0 additions & 37 deletions vendor/deno.land/x/oauth2_client@v1.0.2/mod.ts

This file was deleted.

Loading