Hi there! I am trying to create a dashboard user l...
# support-questions-legacy
a
Hi there! I am trying to create a dashboard user like this
Copy code
curl --location --request POST 'http://localhost:3567/api/recipe/dashboard/user' \
--header 'rid: dashboard' \
--header 'Content-Type: application/json' \
--data-raw '{"email":"akrem@agenta.com" ,"password": "pass"}'
however am getting this error and I don't find docs about it
Copy code
AppId or tenantId not found => Tenant with the following connectionURIDomain, appId and tenantId combination not found: (, public, api)
r
Hey. Can I see the curl command that’s shown on the dashboard UI?
a
sure
Copy code
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": "<YOUR_EMAIL>","password": "<YOUR_PASSWORD>"}'
r
Right. So first, you need to change your backend to use localhost:3567 instead of try.supertokens.com
Second, the issue with your previous curl command is that you have a /api/ in the path. Remove that.
a
thank you! however it raised another issue. let me give you context. am running on docker-compose so I need to pass from my backend
Copy code
supertokens_config=SupertokensConfig(
        connection_uri="http://supertokens:3567",
        # api_key=<API_KEY(if configured)>
    ),
now if I d like to create an admin user and this is the generated curl
Copy code
curl --location --request POST 'http://supertokens:3567/recipe/dashboard/user' \
--header 'rid: dashboard' \
--header 'api-key: <YOUR-API-KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{"email": "<YOUR_EMAIL>","password": "<YOUR_PASSWORD>"}'
however to run it I still need to adjust the endpoint to localhost:3567 as am running the command from outside of the docker container. now doing so is now triggering this error:
r
Which database are you using?
a
mongo
r
Right. We support only the session recipe with mongodb. So you will need to use mysql or psql. Or, sign up for our managed core service.
a
you mean you don't support seesion recipe with mongodb
right ?
r
We do. But only session recipe. All other recipes are unsupported with mongodb
a
sorry which recipe is session ?
email+pass is meant by session ?
r
No. There is a list on the right of what the screenshot shows
It has session recipe
Anyway, if you want to use any of our login methods or the dashboard, we don’t support it with mongodb
a
right right
amazing thanks for the help!!!
additional question please, is this somewhere on your roadmap to support the other recipes or is it kept to be for the paid features ?
r
We don’t have any plans to support mongo as of yet. But perhaps next year.
a
r
There are users who use us with mongodb just for sessions.
If you are asking why it’s in the passwordless docs, yea.. it should not be. It’s just how we have laid out the docs replication strategy across recipes, is why it’s there
a
alright alright. thanks for the explanations
so I switched to postgres I was able to create an admin user then when trying to login am getting this
r
@nkshah2 can help with this
n
Hi @akrem.yes Can you check the network tab to see if any of the network requests are failing?
a
actually it's 200
n
Can I see the response for it?
a
I can also confirm that the dashboard user is well created
so the response is a html code of my page, that's mean to be when we are successfully logged in
n
The response for the sign in api is the html code for your page?
a
basically the paged to be redirected to once succefully logged in but 1. it's not redirecting 2. I understood that it should be redirecting to the dashboard where I will see users
n
Right, so the dashboard you are looking at is for managing your users. It shouldn’t have anything to do with your actual web app
a
exactly, then there is something weird :/
n
Do you have your html being served from an api in your backend?
a
no
n
What framework are you using on your backend?
a
fastapiu
n
Also make sure to pass the port for the api domain when initialising SuperTokens in the backend
I think you have it set to just localhost without any port
a
Copy code
init(
    app_info=InputAppInfo(
        app_name="my_app",
        api_domain="http://localhost",
        website_domain="http://localhost",
        api_base_path="/auth/",
        website_base_path="/auth"
    ),
    supertokens_config=SupertokensConfig(
        connection_uri="http://supertokens:3567",
    ),
    framework='fastapi',
    recipe_list=[
        session.init(),  # initializes session features
        passwordless.init(
            flow_type="USER_INPUT_CODE",
            contact_config=ContactEmailOnlyConfig()
        ),
        dashboard.init(),
    ],
    mode='asgi'  # use wsgi if you are running using gunicorn
)
the think is that I am able to do a normal login btw
n
Right your website domain and api domain are the same, you need to include the port for both when initialising SuperTokens
If for your use case both domains are the same then you need to use different base paths for the api and website layer
Currently some of the routes will be the same for both the frontend and backend, which is probably what is resulting in this
a
hmmm I see I see
15 Views