locked
Azure Authentication

    Question

  • I have an app that I have enable the Azure authentication on.

    My issues is that when the login prompt comes up, if the user click on the Arrow to back out of the prompt the application opens. How can I force the login else cancel the application.

    Thanks

    This is what I have in my App.cs file.

    try
    {
     MobileServiceUser user = await App.mobileService.LoginAsync(MobileServiceAuthenticationProvider.WindowsAzureActiveDirectory);
                   
    }
     catch (InvalidOperationException)
    {
        //nothing here yet          
    }

    Thursday, May 8, 2014 6:29 PM

Answers

  • Seems my understanding is correct. As I mentioned before, the app cannot terminate itself, otherwise it will not pass the WACK test and could not be uploaded to the Store.

    I would suggest you to let the user do the close action, for instance you can tell your user in the mainpage that if they not login, they can do nothing in the app and give them a chance to retry login, otherwise, suggest them to close the app.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 12, 2014 2:06 AM
    Moderator

All replies

  • Hi rlawrimore,

    I don't know what you mean by cancel here, but app cannot terminate itself, the close action should come from the user. But you can always suggest your user to close the app if they choose not login.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    Friday, May 9, 2014 7:28 AM
    Moderator
  • I would like to have the login be the very first thing that happens when the app opens. If they cancel the login, then the app would close.
    Friday, May 9, 2014 2:21 PM
  • Seems my understanding is correct. As I mentioned before, the app cannot terminate itself, otherwise it will not pass the WACK test and could not be uploaded to the Store.

    I would suggest you to let the user do the close action, for instance you can tell your user in the mainpage that if they not login, they can do nothing in the app and give them a chance to retry login, otherwise, suggest them to close the app.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Monday, May 12, 2014 2:06 AM
    Moderator