-->

Azure not redirecting after login

2019-08-25 20:15发布

问题:

I have been following the https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-android-get-started-users for configuring my app for logging into Google using Azure authentication services, I'm getting a login screen where I click on a account and log in.

but, I'm routed to the following successfully logged in screen with no redirect to my app:

I have quadrupled checked my redirect URLs and other URLs and done the following: 1) Google credentials ID & key for web application, 2) SHA-1 for Android app generated using debug.keystore, 3) Authentication / Authorization Azure backend setup as listed in the Azure training site.

The probability still I think rests with the URL formatting problem but I have tried everything from easyauth.callback to /.auth/login/google/callback and https to http but its not redirecting to my app and not providing authentication

I'm using the To-Do list example.

回答1:

My advice would be to downgrade to 2.0 or 3.0 Azure Mobile Client. I know that is not a great answer. But I have been stuck at the same place you have been. For over a week. I am in the process of switching my app to replicate Adrian Hall's sample project which is set up to run on 2.0 Azure Mobile Client. https://adrianhall.github.io/develop-mobile-apps-with-csharp-and-azure/chapter2/enterprise/



回答2:

I finally figured it out! I think this is the same issue you are having. You can not have your Url Scheme start with a capital letter. yes... it's that simple. Stumped me for over 2 weeks. my Url Scheme was "ToDoList53172" and I switched it to "todolist53172" and it worked. I think that only the starting letter needs to be undercase, but I just did it to all letters lol.



回答3:

The solution is to properly format the redirectURL and setup in your app. For instance, to configure zumo e2e test app with URL scheme "ZumoE2ETestApp", you simply add "ZumoE2ETestApp://easyauth.callback" in the "ALLOWED EXTERNAL REDIRECT URLS" setting.