supertokens / supertokens-core

Open source alternative to Auth0 / Firebase Auth / AWS Cognito
https://supertokens.com
Other
12.53k stars 486 forks source link

[RELEASE]: Multi tenancy UI dashboard + account linking fixes + telemetry change to include websiteDomain + email verification claim change + extending jwks lifetime #1011

Open rishabhpoddar opened 1 month ago

rishabhpoddar commented 1 month ago

πŸ“… Checklist

Release order

πŸ”Ά Staging

Dev Tag

Others

πŸ“š Documentation (test site)

πŸ’» NPM and core release

πŸ“š Documentation

Contents of running try.supertokens.com script:

docker run -d \
    --restart=always \
    --name try-supertokens \
    --label name=try-supertokens \
    --label type=session-service \
    --label mode=production \
    --log-driver=awslogs --log-opt awslogs-region=ap-south-1 --log-opt awslogs-group=try-supertokens --log-opt awslogs-stream=try-supertokens \
    -e DISABLE_TELEMETRY=true \
    --publish 9999:3567 \
    supertokens/supertokens-postgresql:6.0

sleep 7

curl --location --request POST 'https://try.supertokens.com/recipe/dashboard/user' \
--header 'rid: dashboard' \
--header 'api-key: <YOUR-API-KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{"email": "rishabh@supertokens.com","password": "abcd1234"}'

curl --location --request POST 'https://try.supertokens.com/recipe/dashboard/user' \
--header 'rid: dashboard' \
--header 'api-key: <YOUR-API-KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{"email": "demo@supertokens.com","password": "abcd1234"}'

curl --location --request PUT 'https://try.supertokens.com/recipe/multitenancy/tenant/v2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tenantId": "tenant1",
    "firstFactors": ["emailpassword", "thirdparty"]
}'

curl --location --request PUT 'https://try.supertokens.com/tenant1/recipe/multitenancy/config/thirdparty' \
--header 'Content-Type: application/json' \
--data-raw '{
  "config": {
    "thirdPartyId": "google-workspaces",
    "name": "Google Workspaces",
    "clients": [
      {
        "clientId": "1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com",
        "clientSecret": "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",
        "additionalConfig": {
            "hd": "*"
        }
      }
    ]
  }
}'

curl --location --request PUT 'https://try.supertokens.com/recipe/multitenancy/tenant/v2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tenantId": "tenant2",
    "firstFactors": ["emailpassword"]
}'

curl --location --request PUT 'https://try.supertokens.com/recipe/multitenancy/tenant/v2' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tenantId": "tenant3",
    "firstFactors": ["otp-email", "otp-phone", "link-phone", "link-email", "thirdparty"]
}'

curl --location --request PUT 'https://try.supertokens.com/tenant3/recipe/multitenancy/config/thirdparty' \
--header 'Content-Type: application/json' \
--data-raw '{
  "config": {
    "thirdPartyId": "github",
    "name": "GitHub",
    "clients": [
      {
        "clientId": "467101b197249757c71f",
        "clientSecret": "e97051221f4b6426e8fe8d51486396703012f5bd"
      }
    ]
  }
}'
rishabhpoddar commented 1 month ago

Dashboard issues

rishabhpoddar commented 1 month ago

Thoughts on 20th july, 2024

I also thought about how we can change the docs and flow so that by default, users dont have to init stuff on the frontend (pre built ui) and can go to the dashboard directly to start configuring the tenants and login methods. This is possible if we:

The issue with the above is that it breaks the flow of setting up:

So they get real feedback really late in the setup phase. As opposed to now, where in the first step is setup frontend, and then get to see the pre built UI immediately. Which is why we didn't go ahead with these changes