Registering User in Atlas Functions

We are registering a new user from our website & app via an Atlas Function using:
      method: 'POST',
      headers: {
        'Accept': 'application.json',
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${access_token}`
      body: JSON.stringify({"email": userEmail, "password": userRandomPassword})

However this requires that every time we run the function we must get the Atlas Access Token first by making a request to:

Which is quite a heavy lot of code to simply register a user, and is really slow.


  1. Is there a faster/simpler way of doing this?
  2. Shouldn’t Atlas Functions have permissions to make a request to Atlas API?
  3. Is is possilbe to run realm-web in Atlas Functions?