Layer 7 API Management

Expand all | Collapse all

currentUser is null in iOS

Jump to Best Answer
  • 1.  currentUser is null in iOS

     
    Posted 05-25-2018 02:37 PM

    I am creating apps for iOS and Android. I have reduced the /userinfo to just send back

     {
        "status" = "OK",
        "sub" = "UfyViAIi6lJTA_t-OoENCHrGv15wLyLm_YXj3zXWYds"
    }

     

    This works fine with Android, but with iOS the "currentUser" is null and logout or other

    actions which need the currentUser are not working.

     

    If I change the /userinfo to 

    {

        "preferred_username" = admin;

        sub = dqUU5rLp3EDxwKAMvEjdW9ro1YlhGt9vGvSqzNgMfSE;

    }

    It works with both OS.

     

    My customer wants to reduce the /userinfo to the first option.



  • 2.  Re: currentUser is null in iOS
    Best Answer

    Posted 06-22-2018 05:28 PM

    Hi Steffen,

     

    Unfortunately, it is current limitation on both iOS and Android that the /userinfo API must be invoked in order for SDK to determine authentication status.  Specifically for iOS, SDK is looking at "preferred_username" in the response of /userinfo API to be returned.

     

    It is mandatory that we need to have that information to correctly validate and analyze the auth status; however, it is also something that we have in our plan to investigate further on actual needs of the entire /userinfo API request.  Which I don't have any set-date or details on what we will do at the moment.

     

    Thanks,