Hi -
Can you plz help with below doubts - cant find the answers in any document.
- In afterLogin(), how can I invalidate the session - will the logout on the passed Backendless user work ??
- How can I return ‘my own error code’ from the afterLogin() - in order to identify the app ‘my own reason’ on why login is un-successful.
- Is there any way to pass ‘device ID’ in the login request - so as the same can be validated in afterLogin() ??
Thanks.
Hi - Request for help on this. Thanks.
Hi Aditya,
Sorry for the delay.
- Yes, you can use logout() method
- You may throw BackendlessException with your custom code
- The best way would be to have ‘deviceId’ property in BackendlessUser object
Thanks - got it.
However, on third point - I would like to have the deviceId with which user is currently trying to login.
And while making login request - I only send userId and password.
Can there be any workaround ?
What you mean by “deviceId” ? It is your custom property ? What should it mean if so?
You can’t transfer you own properties in login() method.
But, for example, you can find out device type from users roles.