Share via

Force Signout

Anonymous
2021-05-21T14:23:43.327+00:00

Hi,

How can I force signout a users from my app by calling SignoutUser()?

My app is a membership app and I don't want the user to keep using the services if they did not pay the fees.

I was thinking for sending Background Notification to the user and then signing out but I ended up with this limitation:

98702-screen-shot-2021-05-21-at-61904-pm.png
Kindly advice..

Developer technologies | .NET | Xamarin
Developer technologies | .NET | Other

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,721 Reputation points Microsoft External Staff
    2021-05-25T03:26:32.817+00:00

    Hello,

    Welcome to our Microsoft Q&A platform!

    So if the user is a member, signed in already to my app and did not sign out but he left the association, I want to send a Background Notification or any other solution so when he starts the app it will clear the Preferences.

    How can I force signout a users from my app by calling SignoutUser()?

    When a user leave the association, the back server should know this, so in this condition, once the user login in this app with the older data(user name and password) from the Preferences, the server should know that this account hasn't pay the fees. In this condition, you can add some logical code in your app to force this user out of the APP instead of let him login in. And at the same time, you can prompt the user: you have not paid, please pay and then try to enter.

    Note:

    In my opinion, even if you erase the user data by clearing the Preferences, what if the user reenters the information himself? So, it's not the ultimate solution. Therefore, when the user logs in the user information, and after verifying the data with the background server, if it is known that the user has not paid, it is still necessary to prompt the user that he has not paid.

    Best Regards,

    Jessie Zhang

    ---
    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.