Skip to content

Conversation

@natac13
Copy link
Contributor

@natac13 natac13 commented Apr 12, 2025

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Apr 12, 2025

⚠️ No Changeset found

Latest commit: 1342dd2

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@wyndhamharyata
Copy link

Hi @natac13, are you still working on this? I've forked your branch and tested it myself, and it's been working well! Though I got some comments that I'd like to add.

@natac13
Copy link
Contributor Author

natac13 commented May 13, 2025

Hi @natac13, are you still working on this? I've forked your branch and tested it myself, and it's been working well! Though I got some comments that I'd like to add.

@muhwyndhamhp Any feedback is welcome. I was 'done' with this to the point of waiting for a review. 🤞

Copy link

@wyndhamharyata wyndhamharyata left a comment

Choose a reason for hiding this comment

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

It's already good IMO, just had one minor implementation nitpick

return nil, ErrInvalidAccessToken
}

var typ interface{}

Choose a reason for hiding this comment

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

I would assume that the usage of interface{} here is to avoid panic due to type mismatch.

I've checked internal implementation on Token.Get() and it should be safe to declare typ directly as string and it won't cause panic but will return error as value.

issuerCache: map[string]WellKnown{},
jwksCache: map[string]jwk.Set{},
mu: sync.RWMutex{},
subjectSchema: &input.SubjectSchema,

Choose a reason for hiding this comment

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

This is not a critique, but I'd say this is an uncommon but very neat way to validate Subject. Never think of it this way!

nullfunc added a commit to DefangLabs/openauth that referenced this pull request Sep 4, 2025
Fixes sst#250 

- [x] handle form POST
- [x] resolve AWS marketplace token w/ AWS `ResolveCustomer`
- [x] store AWS marketplace info in tenants table
- [x] notify Fabric of AWS subscription through Hasura events (cf.
existing Stripe hooks); see
DefangLabs/defang-mvp#2096
- [ ] handle `x-amzn-marketplace-offer-type=free-trial` form param

---------

Co-authored-by: Raphael Titsworth-Morin <[email protected]>
Co-authored-by: Eric Liu <[email protected]>
Co-authored-by: Eric Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants