-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Switch logto role assignment to subscription webhook [DEV-4164] #565
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: jay-dee7 <me@jsdp.dev>
jay-dee7
force-pushed
the
feat/assign-logto-roles-on-subscription
branch
from
August 1, 2024 12:12
b131d96
to
50a56d9
Compare
Signed-off-by: jay-dee7 <me@jsdp.dev>
jay-dee7
force-pushed
the
feat/assign-logto-roles-on-subscription
branch
from
August 1, 2024 12:13
50a56d9
to
35fe107
Compare
Signed-off-by: jay-dee7 <me@jsdp.dev>
Eengineer1
requested changes
Aug 1, 2024
Signed-off-by: jay-dee7 <me@jsdp.dev>
Signed-off-by: jay-dee7 <me@jsdp.dev>
jay-dee7
force-pushed
the
feat/assign-logto-roles-on-subscription
branch
2 times, most recently
from
August 2, 2024 07:53
d4e9764
to
08f83ca
Compare
jay-dee7
changed the title
feat: Switch logto role assignment to subscription webhook
feat: Switch logto role assignment to subscription webhook - [DEV-4164]
Aug 2, 2024
Signed-off-by: jay-dee7 <me@jsdp.dev>
jay-dee7
force-pushed
the
feat/assign-logto-roles-on-subscription
branch
from
August 2, 2024 08:27
08f83ca
to
dc12b8d
Compare
Signed-off-by: jay-dee7 <me@jsdp.dev>
ankurdotb
changed the title
feat: Switch logto role assignment to subscription webhook - [DEV-4164]
feat: Switch logto role assignment to subscription webhook [DEV-4164]
Aug 2, 2024
ankurdotb
reviewed
Aug 2, 2024
Signed-off-by: jay-dee7 <me@jsdp.dev>
Signed-off-by: jay-dee7 <me@jsdp.dev>
Signed-off-by: jay-dee7 <me@jsdp.dev>
Signed-off-by: jay-dee7 <me@jsdp.dev>
ankurdotb
approved these changes
Aug 2, 2024
cheqd-bot bot
pushed a commit
that referenced
this pull request
Aug 2, 2024
## [3.1.0-develop.3](3.1.0-develop.2...3.1.0-develop.3) (2024-08-02) ### Features * Switch logto role assignment to subscription webhook [DEV-4164] ([#565](#565)) ([0b93908](0b93908))
🎉 This PR is included in version 3.1.0-develop.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
cheqd-bot bot
pushed a commit
that referenced
this pull request
Aug 5, 2024
## [3.1.0](3.0.0...3.1.0) (2024-08-05) ### Features * Switch logto role assignment to subscription webhook [DEV-4164] ([#565](#565)) ([0b93908](0b93908)) * Synchronising stripe and studio API state - [DEV-4157] ([#561](#561)) ([f338db7](f338db7)) ### Bug Fixes * Return proper response on auth setup [DEV-4146] ([#560](#560)) ([690d854](690d854)) * trigger stripe account creation on sign-in ([#559](#559)) ([d2fec93](d2fec93)) * Use `admin:subscription:get` auth guard for Stripe checkout session ([#564](#564)) ([fc631e4](fc631e4))
🎉 This PR is included in version 3.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR switches the user Logto role assignment logic.
Caution
Testnet Role
by default to all users. This has been removed now.We now use the
Portal
role as the default role. We assign this role on Studio Portal, and as a fallback option, we also assign this role here. Double assigning does not have any side-effects.We've now switched the logic to assign Logto roles based on user subscription. To achieve this, we now have two additional environment variables:
LOGTO_TESTNET_ROLE_ID
- Logto role ID for the Testnet role. This must be set in environment variablesLOGTO_MAINNET_ROLE_ID
- Logto role ID for the Mainnet role. This must be set in environment variablesThis is the flow:
PostRegister
PostSignIn
Build Plan
, assignMainnet
,Testnet
andPortal
Logto rolesTest Plan
, assignTestnet
andPortal
rolesPortal
Logto rolecustomer.subscription.deleted
customer.subscription.created
customer.subscription.updated
Build Plan
, assignMainnet
,Testnet
andPortal
Logto rolesTest Plan
, assignTestnet
andPortal
rolesTest
andBuild
plans (leaving Portal role)