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

allow passing null to service scope, do not check domains on secretKey auth #5728

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Dec 13, 2024

fixes: DASH-621


PR-Codex overview

This PR introduces enhancements to the authorization process by allowing an authMethod to be passed, enabling flexibility in service scope validation, and updating billing status options. It also improves type definitions for better clarity on authorization methods.

Detailed summary

  • Added authMethod to the teamAndProjectResponse.
  • Allowed null for serviceScope in CoreServiceConfig.
  • Updated billingStatus options from "noCustomer" to "noPayment".
  • Enhanced authorizeService and client functions to handle authMethod.
  • Defined authMethod in TeamAndProjectResponse type.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Dec 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:15am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:15am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:15am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 13, 2024 6:15am

@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 13, 2024 05:54 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 13, 2024 05:54 Inactive
Copy link

changeset-bot bot commented Dec 13, 2024

🦋 Changeset detected

Latest commit: a077023

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@thirdweb-dev/service-utils Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel vercel bot temporarily deployed to Preview – wallet-ui December 13, 2024 05:54 Inactive
@jnsdls jnsdls marked this pull request as ready for review December 13, 2024 05:54
Copy link
Member Author

jnsdls commented Dec 13, 2024


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@jnsdls jnsdls force-pushed the 12-12-allow_passing_null_to_service_scope_do_not_check_domains_on_secretkey_auth branch from cfb4506 to 3c8ddee Compare December 13, 2024 05:55
Copy link

linear bot commented Dec 13, 2024

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.85%. Comparing base (90a16da) to head (a077023).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5728   +/-   ##
=======================================
  Coverage   52.85%   52.85%           
=======================================
  Files        1098     1098           
  Lines       58976    58976           
  Branches     4788     4788           
=======================================
  Hits        31173    31173           
  Misses      27087    27087           
  Partials      716      716           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 90a16da
packages 49.95% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor

github-actions bot commented Dec 13, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.94 KB (0%) 899 ms (0%) 361 ms (+10.18% 🔺) 1.3 s
thirdweb (cjs) 110.78 KB (0%) 2.3 s (0%) 891 ms (+1.76% 🔺) 3.2 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 183 ms (+105.71% 🔺) 295 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 11 ms (-49.47% 🔽) 21 ms
thirdweb/react (minimal + tree-shaking) 19.03 KB (0%) 381 ms (0%) 329 ms (+216.95% 🔺) 709 ms

Copy link

graphite-app bot commented Dec 13, 2024

Merge activity

…tKey` auth (#5728)

fixes: DASH-621

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on enhancing the authorization process by introducing an `authMethod` property and allowing `null` service scopes, while modifying billing statuses and service configuration types.

### Detailed summary
- Added `authMethod` to `teamAndProjectResponse`.
- Allowed passing `null` to `serviceScope` in `CoreServiceConfig`.
- Changed `billingStatus` from `"noCustomer"` to `"noPayment"`.
- Updated `TeamAndProjectResponse` to include `authMethod` type.
- Adjusted authorization logic for `secretKey` and null service scopes.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the 12-12-allow_passing_null_to_service_scope_do_not_check_domains_on_secretkey_auth branch from 222f371 to a077023 Compare December 13, 2024 06:12
@@ -42,11 +45,11 @@ export type TeamResponse = {
name: string;
slug: string;
image: string | null;
billingPlan: string;
billingPlan: "free" | "starter" | "growth" | "pro";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirming if you want pro or custom

@graphite-app graphite-app bot merged commit a077023 into main Dec 13, 2024
32 checks passed
@graphite-app graphite-app bot deleted the 12-12-allow_passing_null_to_service_scope_do_not_check_domains_on_secretkey_auth branch December 13, 2024 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants