How To Safe Your Azure App Service With Google Authentication
Introduction
Please check out my earlier articles about different varieties of authentication in Azure App Service which can enable you to to satisfy your utility requirement.
Creating Google Shopper App
Step 1
Step 2
Step 3
As soon as you’re logged in, if you wish to use present mission choose that. To create a brand new mission, click on on “Choose a mission” within the high nav.
Step 4
It would open up a popup the place you possibly can create a “New Venture”

Step 5
Give a reputation to your mission and click on “Create” button. Within the upcoming Venture Dashboard choose “Credentials” from left menu and click on “Configure Consent Display screen”.

Step 6
Consent display helps to configure the essential details about the app like Utility Identify, Brand, Privateness Coverage URL. Choose the Electronic mail id which you need to use for assist. Search for Licensed domains choice in the identical web page and add your app service area like under
- <yourazureappname>.azurewebsites.internet
Click on enter, it will likely be added within the area checklist, now click on “Save” button.
Step 7
Once more, go to “Credentials” from the left menu and select “+ Create Credentials” button, within the checklist of choices choose “OAuth shopper ID”

Step 8
Within the upcoming web page, choose Utility Kind as “Net Utility”. It would open a piece the place you possibly can configure origins and redirect URI’s like under and click on Create button.
Word
Be sure you enter the under URL’s in lowercase format. As a result of the approved domains that we add in Step 6 shall be added as lowercase and area comparability shall be finished in opposition to the url that we including now.
Licensed JavaScript Origins,
- https://<yourazureappname>.azurewebsites.internet
Licensed Redirect URI,
- https://<yourazureappName>.azurewebsites.internet/.auth/login/google/callback

Step 9
Within the upcoming popup Copy the Shopper ID and Shopper Secret, you’ll need this later to configure in Azure App Service.
Configuring Google Authentication in Azure App Service
Step 1
Step 2
Click on on any of the app service utility on which you want to allow Google authentication.
Step 3
Within the upcoming properties pane search for Authentication/Authorization choice like under. By default, Authentication is disabled, allow it utilizing the toggler such as you see within the under screenshot.

Step 4
Within the upcoming display choose “Google” because the authentication kind. Enter the App ID and App Secret you obtained from Google developer console and click on OK button.
Step 5
Now, in authentication display select “Motion to take when request is just not authenticated” as “Log in with Google” and click on Save.

Step 6
Now we’re all set with the Google authentication, browse your utility and within the browser you may be prompted to enter your Google credentials.
As soon as your Google credentials are validated, it is going to take you to your precise Azure App Service utility.
I hope this text lets you allow Google authentication on an Azure App Service. When you’ve got any questions/points about this text, please let me know within the feedback.