zafer7929
02/16/2024, 8:40 AMcurl -X POST http://mydomain.localdev/api/auth/mytenant/signup \
-H "Content-Type: application/json" \
-d '{
"formFields": [
{"id": "email", "value": “email@gmail.com"},
{"id": "password", "value": “Password123”},
{"id": "username", "value": “myusername},
{"id": "surname", "value": “mysurname”},
{"id": "role", "value": "Admin"},
{"id": "phone", "value": “55555555555”},
{"id": "status", "value": “pending”},
{"id": "two-step-verification", "value": “false”}
]
}'
they can specify the tenant they wish to join by replacing mytenant with the desired tenant value, thus gaining unauthorized access to a tenant they shouldn't have access to. To solve this, I'm considering performing a session check when a request is made to the signup method.
When a POST request is made to SignUp, I want to check if the session of the requestor exists and if it does, access various information within the session. If there is no session, I want to register them to the public tenant.
So, how can i access the request's session in the signup method?zafer7929
02/16/2024, 8:40 AMrp_st
02/16/2024, 12:40 PMSuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by