-
Notifications
You must be signed in to change notification settings - Fork 1
Sign up Validation with Azure Function
Continuing with the process of Authentication and authorization setup
We need to create an Azure Function with the purpose of restrict external users.
For this is necessary to go to Function App section, click on new and create an app function with the next values:
Publish: Code
Runtime stack: Node.js
Version: 12 LTS
Region: Central US
Operating System: Windows
It's also possible to create a Function App with the
Linux
operating system. The main difference is thatWindows
allow you to edit the functions online in the Azure Portal.
Then inside the Function App, it's necessary to create a function in the section Functions
on the sidebar.
[[auth/assets/25.png]
We need to select Add
then in Development environment
select Develop in portal
, now select an HTTP trigger
template, authorization level Function
, name it and create the function.
Then inside the function go to Developer
section on Code + Test
and change the content of the function with the SignUpValidation
function located on time-tracker-azure-functions repository and save it.
Finally, it's necessary to set BASIC_AUTH_PASSWORD
, BASIC_AUTH_USERNAME
and EMAIL_ENABLED_FOR_REGISTRATION
as environment variables for the function in the following path: Function App > Settings > Configuration