We have set up our AR Cloud infrastructure with Azure and everything works fine. We however have an issue that every time that the device is shut down, the device logs out from the service, and we need to re-enter the credentials. Is this a known flow? Or a bug?
Moreover, is there a way to check if the device is logged in inside a Unity app? That could ensure a better user flow if the app could detect that the device need to login, ask the user the credentials et then log the device against the AR Cloud service.
Thank you for your feedback regarding the AR Cloud authentication flow. We are always looking to improve our systems and make development easier for our users. I have reached out to our team regarding your issue and will report back as soon as I learn more.
If you are using one of the previous releases, the session idle time was configured to a very short time period. This has been changed to 3 days in the previous release and 30 days in the upcoming release. You can modify the value in your Keycloak instance manually as described here.
In short:
go to Enterprise Console
click on Users in the top menu
click on Administration Console
log in using the Keycloak admin credentials provided as the output of the setup script
select the magicleap realm in the top-left corener
click on Clients in the left menu
click on the ml2 client
select the Advanced tab and click on Advanced Settings on the right
change the value of Client Session Idle and (make sure it is smaller than Client Session Max and adjust this one as well if needed)
click on Realm settings in the left menu
select the Sessions tab
change the value of SSO Session Idle to be no smaller than the value set for the client (make sure the value of SSO Session Max is greater or equal)