hey team, I changed some custom claims in the access token payload, since then, I dont seem to get t...
m
hey team, I changed some custom claims in the access token payload, since then, I dont seem to get the
Session.doesSessionExist()
to be true. I've added an array to one of the custom claim. Not sure if thats supported
r
hey @mukulg22 can you elaborate please?
m
Hey @rp_st i figured out the issue, my claims was over 4096B and so I eventually reduced it.
I have another query here
r
aahhh right
sure
m
We are trying to resign the jwt with custom claim key and value. Is there a way to do that
Without making the user to login back again
r
use the session.mergeIntoAccessToken payload function on the backend
m
Which method should I invoke from the frontend?
r
you can;'t change the payload from the frontend
m
Should I expose it as an api from backend?
r
you will have to make an API of your own which does the payload change
> Should I expose it as an api from backend? Yes
m
Is this a good practice?
r
yup
m
Perfect
r
and the APi should do session verification first
m
Will give it a try and update
@rp_st Im not able to access the user management dashboard using
/auth/dashboard
url
n
Hi @mukulg22 Can I see the full config you pass to SuperTokens when initialising it on the backend
m
refer to the issue attached
n
Im not sure thats the image you meant to send
m
Check this
n
Try opening
API_DOMAIN/dashboard
(without the
/auth
)
m
I have /auth in the apiBasePath
n
In the config you just sent its
apiBasePath: "",
m
It was working fine for a long time, now all I see is a blank white screen with Supertokens favicon.
route isnt an issue here
n
Do you see any errors in the browser console?
m
this is what i see
n
What version of the SDK are you using?
m
12.1.1
n
Do you see errors in the network tab?
Also can you try in a private tab/incognito window
m
hey @rp_st facing cors issue when i try to access the api. Using express for backend and angular for frontend
r
what's the cors error on the browser?
m
Yes. It throws cors for custom api written in express, supertoken middleware apis work fine
r
whats the error though?
m
r
on the browser console
m
r
right. You should add
"authorization"
in the access-control-allowed-header cors setting
m
@rp_st fixed it.
Facing 403 for the custom claim api
Copy code
{
  "message": "invalid claim",
  "claimValidationErrors": [
    {
      "id": "st-ev",
      "reason": {
        "message": "wrong value",
        "expectedValue": true,
        "actualValue": false
      }
    }
  ]
}
r
right. So this means that the user needs to go through the email verification flow first before given access to any of the APIs.
m
cool ev means email verification? Is it alright if i disable the email verification required in the configuration to overcome this?
r
yea.. up to you really. Depends on your business needs
m
cool
thanks a mill for your help
10 Views