ApiRTC / ApiRTC-cordova-demo

Example of how to use ApiRTC into mobile application
14 stars 8 forks source link

Authentication Process using JSON Token Not Working #19

Closed creativitycomkw closed 3 years ago

creativitycomkw commented 3 years ago

Hi,

I am facing an issue with the Authentication Process using JSON Token after generating the token, it only works only once or not even once and we get the registration error please check this issue and take necessary action on it

FredLuart commented 3 years ago

Please make sure not to change your configuration on authentication activation : there is a 10 mn cache on the enterprise configuration : I think it may explain the behavior

creativitycomkw commented 3 years ago

ok you mean to say, I have to wait for a minimum of 10 mins to get changes to reflect?

FredLuart commented 3 years ago

Yes, when you change the authentication configuration on the dashboard

creativitycomkw commented 3 years ago

ok got it

FredLuart commented 3 years ago

I am closing the issue as I suppose this is ok

creativitycomkw commented 3 years ago

Hi,

I am still facing the same issue after waiting for half an hour the authentication configuration is not getting refreshed on the server

kindly check the attached screenshot

Screen Shot 2021-01-14 at 9 46 38 AM Screen Shot 2021-01-14 at 9 51 42 AM
FredLuart commented 3 years ago

JWT malformed mean that the token your are using for registration is not correct : it doesn't pass the verify() checking of JWT

Check documentation here : https://dev.apirtc.com/authentication and here for token generation : https://apirtc.com/apirtc-access-token-using-json-web-token-jwt-for-session-authentication/

creativitycomkw commented 3 years ago

ok but I am copying the token from the panel and using it in the app I tried so many times I am sure it is not a typo mistake it never worked with me

FredLuart commented 3 years ago

Are you not talking about the secret key instead of the token ?

You need to generate the token with the code : https://github.com/apizee/apiRTC_JSON_Token_generator

The secret key, you have in the dashboard is then used to generate the token

creativitycomkw commented 3 years ago

ok got it