From dd651b38dabf935222b5e829f9d655950a298536 Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Tue, 12 Sep 2023 12:41:01 +0530 Subject: [PATCH 1/6] Add section for admins in the user dashboard docs --- v2/emailpassword/custom-ui/init/dashboard.mdx | 83 +++++++++++++++++++ .../pre-built-ui/setup/dashboard.mdx | 83 +++++++++++++++++++ v2/passwordless/custom-ui/init/dashboard.mdx | 83 +++++++++++++++++++ .../pre-built-ui/setup/dashboard.mdx | 83 +++++++++++++++++++ v2/thirdparty/custom-ui/init/dashboard.mdx | 83 +++++++++++++++++++ .../pre-built-ui/setup/dashboard.mdx | 83 +++++++++++++++++++ .../custom-ui/init/dashboard.mdx | 83 +++++++++++++++++++ .../pre-built-ui/setup/dashboard.mdx | 83 +++++++++++++++++++ .../custom-ui/init/dashboard.mdx | 83 +++++++++++++++++++ .../pre-built-ui/setup/dashboard.mdx | 83 +++++++++++++++++++ v2/userdashboard/about.mdx | 83 +++++++++++++++++++ 11 files changed, 913 insertions(+) diff --git a/v2/emailpassword/custom-ui/init/dashboard.mdx b/v2/emailpassword/custom-ui/init/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/emailpassword/custom-ui/init/dashboard.mdx +++ b/v2/emailpassword/custom-ui/init/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/emailpassword/pre-built-ui/setup/dashboard.mdx b/v2/emailpassword/pre-built-ui/setup/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/emailpassword/pre-built-ui/setup/dashboard.mdx +++ b/v2/emailpassword/pre-built-ui/setup/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/passwordless/custom-ui/init/dashboard.mdx b/v2/passwordless/custom-ui/init/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/passwordless/custom-ui/init/dashboard.mdx +++ b/v2/passwordless/custom-ui/init/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/passwordless/pre-built-ui/setup/dashboard.mdx b/v2/passwordless/pre-built-ui/setup/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/passwordless/pre-built-ui/setup/dashboard.mdx +++ b/v2/passwordless/pre-built-ui/setup/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/thirdparty/custom-ui/init/dashboard.mdx b/v2/thirdparty/custom-ui/init/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/thirdparty/custom-ui/init/dashboard.mdx +++ b/v2/thirdparty/custom-ui/init/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/thirdparty/pre-built-ui/setup/dashboard.mdx b/v2/thirdparty/pre-built-ui/setup/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/thirdparty/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdparty/pre-built-ui/setup/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx b/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx +++ b/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx b/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx b/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx +++ b/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx b/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx index 80f079723..36c5f38b4 100644 --- a/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx @@ -168,6 +168,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly diff --git a/v2/userdashboard/about.mdx b/v2/userdashboard/about.mdx index 809eaf9d0..64664bdd8 100644 --- a/v2/userdashboard/about.mdx +++ b/v2/userdashboard/about.mdx @@ -174,6 +174,89 @@ You can edit user information and perform actions such as resetting a user's pas Some features such as user metadata and email verification have to be enabled in your backend before you can use them in the user management dashboard ::: +## Restricting access to dashboard users + +When using the dashboard recipe you can restrict access to certain features by providing a list of emails to be considered as "admins". When a dashboard user logs in with an email not present in this list, they will only be able to perform read operations and all write operations will result in the backend SDKs failing the request. + +You can provide an array of emails to the backend SDK when initialising the dashboard recipe: + +:::important +- Not providing an admins array will result in all dashboard users being allowed both read and write operations +- Providing an empty array as admins will result in all dashboard users having ONLY read access +::: + + + + +```tsx +import SuperTokens from "supertokens-node"; +import Dashboard from "supertokens-node/recipe/dashboard"; + +SuperTokens.init({ + appInfo: { + apiDomain: "...", + appName: "...", + websiteDomain: "...", + }, + recipeList: [ + // TODO: Initialise other recipes + // highlight-start + Dashboard.init({ + admins: [], + }), + // highlight-end + ], +}); +``` + + + + +```go +import ( + "github.com/supertokens/supertokens-golang/recipe/dashboard" + "github.com/supertokens/supertokens-golang/supertokens" +) + +func main() { + supertokens.Init(supertokens.TypeInput{ + RecipeList: []supertokens.Recipe{ + // TODO: Initialise other recipes + // highlight-start + dashboard.Init(&dashboardmodels.TypeInput{ + Admins: &[]string{} + }), + // highlight-end + }, + }); +} +``` + + + + +```python +from supertokens_python import init, InputAppInfo +from supertokens_python.recipe import dashboard + +init( + app_info=InputAppInfo( + api_domain="...", app_name="...", website_domain="..."), + framework='...', # type: ignore + recipe_list=[ + # TODO: Initialise other recipes + # highlight-start + dashboard.init( + admins=[], + ), + # highlight-end + ] +) +``` + + + + ## Content Security Policy If you return a `Content-Security-Policy` header in from your backend, you will need to include the following directives for the user management dashboard to work correctly From f2aa66cf493e4be3599b44bbdfa529a37b9b966a Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Tue, 12 Sep 2023 13:21:54 +0530 Subject: [PATCH 2/6] Update goenv --- v2/emailpassword/custom-ui/init/dashboard.mdx | 3 ++- v2/emailpassword/pre-built-ui/setup/dashboard.mdx | 3 ++- v2/passwordless/custom-ui/init/dashboard.mdx | 3 ++- v2/passwordless/pre-built-ui/setup/dashboard.mdx | 3 ++- v2/src/plugins/codeTypeChecking/goEnv/go.mod | 2 +- v2/src/plugins/codeTypeChecking/goEnv/go.sum | 2 ++ v2/thirdparty/custom-ui/init/dashboard.mdx | 3 ++- v2/thirdparty/pre-built-ui/setup/dashboard.mdx | 3 ++- v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx | 3 ++- v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx | 3 ++- v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx | 3 ++- v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx | 3 ++- v2/userdashboard/about.mdx | 3 ++- 13 files changed, 25 insertions(+), 12 deletions(-) diff --git a/v2/emailpassword/custom-ui/init/dashboard.mdx b/v2/emailpassword/custom-ui/init/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/emailpassword/custom-ui/init/dashboard.mdx +++ b/v2/emailpassword/custom-ui/init/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/emailpassword/pre-built-ui/setup/dashboard.mdx b/v2/emailpassword/pre-built-ui/setup/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/emailpassword/pre-built-ui/setup/dashboard.mdx +++ b/v2/emailpassword/pre-built-ui/setup/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/passwordless/custom-ui/init/dashboard.mdx b/v2/passwordless/custom-ui/init/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/passwordless/custom-ui/init/dashboard.mdx +++ b/v2/passwordless/custom-ui/init/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/passwordless/pre-built-ui/setup/dashboard.mdx b/v2/passwordless/pre-built-ui/setup/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/passwordless/pre-built-ui/setup/dashboard.mdx +++ b/v2/passwordless/pre-built-ui/setup/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/src/plugins/codeTypeChecking/goEnv/go.mod b/v2/src/plugins/codeTypeChecking/goEnv/go.mod index eca1962f5..ac50b255e 100644 --- a/v2/src/plugins/codeTypeChecking/goEnv/go.mod +++ b/v2/src/plugins/codeTypeChecking/goEnv/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-chi/cors v1.2.1 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 - github.com/supertokens/supertokens-golang v0.12.11-0.20230814151216-eb760d701836 + github.com/supertokens/supertokens-golang v0.13.3-0.20230912064227-6f4ec906a3d5 ) require ( diff --git a/v2/src/plugins/codeTypeChecking/goEnv/go.sum b/v2/src/plugins/codeTypeChecking/goEnv/go.sum index dd1fd211f..e9cd7d8fa 100644 --- a/v2/src/plugins/codeTypeChecking/goEnv/go.sum +++ b/v2/src/plugins/codeTypeChecking/goEnv/go.sum @@ -103,6 +103,8 @@ github.com/supertokens/supertokens-golang v0.12.11-0.20230807185417-d898c8941d41 github.com/supertokens/supertokens-golang v0.12.11-0.20230807185417-d898c8941d41/go.mod h1:qmgK9bVmbkCjJm4hjAjLl+9KvzG6TFFNPHo4BRwOZJE= github.com/supertokens/supertokens-golang v0.12.11-0.20230814151216-eb760d701836 h1:pj4Ecp7qcseKpWoCAnG/RNjkJqBM/VZkwsS1Iu6aJ9k= github.com/supertokens/supertokens-golang v0.12.11-0.20230814151216-eb760d701836/go.mod h1:qmgK9bVmbkCjJm4hjAjLl+9KvzG6TFFNPHo4BRwOZJE= +github.com/supertokens/supertokens-golang v0.13.3-0.20230912064227-6f4ec906a3d5 h1:6fkuipQhyRBxI77TQS8HyvgfKZ6rCpYOvRWKaWAlgv4= +github.com/supertokens/supertokens-golang v0.13.3-0.20230912064227-6f4ec906a3d5/go.mod h1:qmgK9bVmbkCjJm4hjAjLl+9KvzG6TFFNPHo4BRwOZJE= github.com/twilio/twilio-go v0.26.0 h1:wFW4oTe3/LKt6bvByP7eio8JsjtaLHjMQKOUEzQry7U= github.com/twilio/twilio-go v0.26.0/go.mod h1:lz62Hopu4vicpQ056H5TJ0JE4AP0rS3sQ35/ejmgOwE= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= diff --git a/v2/thirdparty/custom-ui/init/dashboard.mdx b/v2/thirdparty/custom-ui/init/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/thirdparty/custom-ui/init/dashboard.mdx +++ b/v2/thirdparty/custom-ui/init/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/thirdparty/pre-built-ui/setup/dashboard.mdx b/v2/thirdparty/pre-built-ui/setup/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/thirdparty/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdparty/pre-built-ui/setup/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx b/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx +++ b/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx b/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx b/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx +++ b/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx b/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx index 36c5f38b4..e39212144 100644 --- a/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx @@ -210,6 +210,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -218,7 +219,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, diff --git a/v2/userdashboard/about.mdx b/v2/userdashboard/about.mdx index 64664bdd8..0c30eea0a 100644 --- a/v2/userdashboard/about.mdx +++ b/v2/userdashboard/about.mdx @@ -216,6 +216,7 @@ SuperTokens.init({ import ( "github.com/supertokens/supertokens-golang/recipe/dashboard" "github.com/supertokens/supertokens-golang/supertokens" + "github.com/supertokens/supertokens-golang/recipe/dashboard/dashboardmodels" ) func main() { @@ -224,7 +225,7 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{} + Admins: &[]string{}, }), // highlight-end }, From a2efd69ad8e0be5d316d4a16e43c3622b8ff2b7f Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Tue, 12 Sep 2023 15:01:30 +0530 Subject: [PATCH 3/6] Update jsenv --- v2/src/plugins/codeTypeChecking/jsEnv/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/src/plugins/codeTypeChecking/jsEnv/package.json b/v2/src/plugins/codeTypeChecking/jsEnv/package.json index 3dce7ab6e..e8f42deb8 100644 --- a/v2/src/plugins/codeTypeChecking/jsEnv/package.json +++ b/v2/src/plugins/codeTypeChecking/jsEnv/package.json @@ -53,7 +53,7 @@ "socket.io": "^4.6.1", "socketio": "^1.0.0", "supertokens-auth-react": "^0.34.0", - "supertokens-node": "^15.0.0", + "supertokens-node": "^15.2.0", "supertokens-node7": "npm:supertokens-node@7.3", "supertokens-react-native": "^4.0.0", "supertokens-web-js": "^0.7.0", @@ -62,4 +62,4 @@ "supertokens-website-script": "github:supertokens/supertokens-website#17.0", "typescript": "^4.9.5" } -} \ No newline at end of file +} From 0675af17ca655b4ebf6750c45cc5279901c10df5 Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Tue, 12 Sep 2023 15:03:40 +0530 Subject: [PATCH 4/6] Update goenv --- v2/src/plugins/codeTypeChecking/goEnv/go.mod | 2 +- v2/src/plugins/codeTypeChecking/goEnv/go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/src/plugins/codeTypeChecking/goEnv/go.mod b/v2/src/plugins/codeTypeChecking/goEnv/go.mod index ac50b255e..157f1188d 100644 --- a/v2/src/plugins/codeTypeChecking/goEnv/go.mod +++ b/v2/src/plugins/codeTypeChecking/goEnv/go.mod @@ -9,7 +9,7 @@ require ( github.com/go-chi/cors v1.2.1 github.com/gorilla/handlers v1.5.1 github.com/gorilla/mux v1.8.0 - github.com/supertokens/supertokens-golang v0.13.3-0.20230912064227-6f4ec906a3d5 + github.com/supertokens/supertokens-golang v0.14.0 ) require ( diff --git a/v2/src/plugins/codeTypeChecking/goEnv/go.sum b/v2/src/plugins/codeTypeChecking/goEnv/go.sum index e9cd7d8fa..467d44176 100644 --- a/v2/src/plugins/codeTypeChecking/goEnv/go.sum +++ b/v2/src/plugins/codeTypeChecking/goEnv/go.sum @@ -105,6 +105,8 @@ github.com/supertokens/supertokens-golang v0.12.11-0.20230814151216-eb760d701836 github.com/supertokens/supertokens-golang v0.12.11-0.20230814151216-eb760d701836/go.mod h1:qmgK9bVmbkCjJm4hjAjLl+9KvzG6TFFNPHo4BRwOZJE= github.com/supertokens/supertokens-golang v0.13.3-0.20230912064227-6f4ec906a3d5 h1:6fkuipQhyRBxI77TQS8HyvgfKZ6rCpYOvRWKaWAlgv4= github.com/supertokens/supertokens-golang v0.13.3-0.20230912064227-6f4ec906a3d5/go.mod h1:qmgK9bVmbkCjJm4hjAjLl+9KvzG6TFFNPHo4BRwOZJE= +github.com/supertokens/supertokens-golang v0.14.0 h1:vec3UJ3x2qrogYVghMztYWUB4ROiwBaNeR2vTFs59vg= +github.com/supertokens/supertokens-golang v0.14.0/go.mod h1:qmgK9bVmbkCjJm4hjAjLl+9KvzG6TFFNPHo4BRwOZJE= github.com/twilio/twilio-go v0.26.0 h1:wFW4oTe3/LKt6bvByP7eio8JsjtaLHjMQKOUEzQry7U= github.com/twilio/twilio-go v0.26.0/go.mod h1:lz62Hopu4vicpQ056H5TJ0JE4AP0rS3sQ35/ejmgOwE= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= From ebba10ca8c182b60c75c89997191680501b89f6c Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Tue, 12 Sep 2023 15:23:54 +0530 Subject: [PATCH 5/6] Add dummy email --- v2/emailpassword/custom-ui/init/dashboard.mdx | 12 +++++++++--- v2/emailpassword/pre-built-ui/setup/dashboard.mdx | 12 +++++++++--- v2/passwordless/custom-ui/init/dashboard.mdx | 12 +++++++++--- v2/passwordless/pre-built-ui/setup/dashboard.mdx | 12 +++++++++--- v2/thirdparty/custom-ui/init/dashboard.mdx | 12 +++++++++--- v2/thirdparty/pre-built-ui/setup/dashboard.mdx | 12 +++++++++--- .../custom-ui/init/dashboard.mdx | 12 +++++++++--- .../pre-built-ui/setup/dashboard.mdx | 12 +++++++++--- .../custom-ui/init/dashboard.mdx | 12 +++++++++--- .../pre-built-ui/setup/dashboard.mdx | 12 +++++++++--- v2/userdashboard/about.mdx | 12 +++++++++--- 11 files changed, 99 insertions(+), 33 deletions(-) diff --git a/v2/emailpassword/custom-ui/init/dashboard.mdx b/v2/emailpassword/custom-ui/init/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/emailpassword/custom-ui/init/dashboard.mdx +++ b/v2/emailpassword/custom-ui/init/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/emailpassword/pre-built-ui/setup/dashboard.mdx b/v2/emailpassword/pre-built-ui/setup/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/emailpassword/pre-built-ui/setup/dashboard.mdx +++ b/v2/emailpassword/pre-built-ui/setup/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/passwordless/custom-ui/init/dashboard.mdx b/v2/passwordless/custom-ui/init/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/passwordless/custom-ui/init/dashboard.mdx +++ b/v2/passwordless/custom-ui/init/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/passwordless/pre-built-ui/setup/dashboard.mdx b/v2/passwordless/pre-built-ui/setup/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/passwordless/pre-built-ui/setup/dashboard.mdx +++ b/v2/passwordless/pre-built-ui/setup/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/thirdparty/custom-ui/init/dashboard.mdx b/v2/thirdparty/custom-ui/init/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/thirdparty/custom-ui/init/dashboard.mdx +++ b/v2/thirdparty/custom-ui/init/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/thirdparty/pre-built-ui/setup/dashboard.mdx b/v2/thirdparty/pre-built-ui/setup/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/thirdparty/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdparty/pre-built-ui/setup/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx b/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx +++ b/v2/thirdpartyemailpassword/custom-ui/init/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx b/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdpartyemailpassword/pre-built-ui/setup/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx b/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx +++ b/v2/thirdpartypasswordless/custom-ui/init/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx b/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx index e39212144..5d931cfa7 100644 --- a/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx +++ b/v2/thirdpartypasswordless/pre-built-ui/setup/dashboard.mdx @@ -196,7 +196,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -219,7 +221,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -242,7 +246,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] diff --git a/v2/userdashboard/about.mdx b/v2/userdashboard/about.mdx index 0c30eea0a..863defbea 100644 --- a/v2/userdashboard/about.mdx +++ b/v2/userdashboard/about.mdx @@ -202,7 +202,9 @@ SuperTokens.init({ // TODO: Initialise other recipes // highlight-start Dashboard.init({ - admins: [], + admins: [ + "johndoe@gmail.com", + ], }), // highlight-end ], @@ -225,7 +227,9 @@ func main() { // TODO: Initialise other recipes // highlight-start dashboard.Init(&dashboardmodels.TypeInput{ - Admins: &[]string{}, + Admins: &[]string{ + "johndoe@gmail.com", + }, }), // highlight-end }, @@ -248,7 +252,9 @@ init( # TODO: Initialise other recipes # highlight-start dashboard.init( - admins=[], + admins=[ + "johndoe@gmail.com", + ], ), # highlight-end ] From 482fe83815542f5d3025252e4b5cf2629cde537f Mon Sep 17 00:00:00 2001 From: Nemi Shah Date: Tue, 12 Sep 2023 16:00:40 +0530 Subject: [PATCH 6/6] Update python env --- v2/src/plugins/codeTypeChecking/pythonEnv/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/src/plugins/codeTypeChecking/pythonEnv/requirements.txt b/v2/src/plugins/codeTypeChecking/pythonEnv/requirements.txt index 493ceb979..3088c9798 100644 --- a/v2/src/plugins/codeTypeChecking/pythonEnv/requirements.txt +++ b/v2/src/plugins/codeTypeChecking/pythonEnv/requirements.txt @@ -72,7 +72,7 @@ six==1.16.0 sniffio==1.3.0 sqlparse==0.4.2 starlette==0.14.2 -supertokens-python @ git+https://github.com/supertokens/supertokens-python.git@2f3fd4c7225f73e45b5247c4ff83afd22fa49038 +supertokens-python @ git+https://github.com/supertokens/supertokens-python@a51d242489e4f0d013937a9d3bf04881b4232981 tldextract==3.1.0 toml==0.10.2 tomli==2.0.1