Menu Home

Using Serverless Azure Functions with Auth0 and Google APIs

[Update 08 April 2017: The Auth0 post Navigating RS256 and JWKS describes RS256 in more detail, including an endpoint for accessing your Auth0 Public key]

This post covers the following user story and appears as a guest post on the Auth0 blog.

As a user, I want to log into the app with my Google account so I get a list of my Google Photos albums.

The backend stack is Nodejs on Azure Functions calling Auth0 and the Google Photos Api via the request module. The client side is a plain old HTML + JavaScript app using the Auth0 Lock for user login in.

NB – for clarity I left out code to check the API access token from Auth0. Normally you would check the user claims to see if is allowed to use the Function at all.

The code is available as GitLab project auth0idp.


Categories: Uncategorized

Tagged as:

Leave a Reply