Are you customising the Users Service?

Hi everyone,

We’re interested in knowing how many of you are customising the Users Service, either using the Custom sign-up flow project or by building your own authentication flow.

In particular, what features did you add to your user authentication process?

Please let us know by replying to this post - it’s valuable feedback that’ll help us as we continue to improve Anvil :slight_smile:

1 Like

Yes, I use a customised login because I usually authenticate & authorise against a MySQL database.

I keep meaning to create a Show N Tell, but as Pink Floyd say so well, “Every year is getting shorter / never seem to find the time…”

In fact, I’m intending to build an api which is functionally and syntactically similar to Users, if not quite the same under the hood, so people can use MySQL with a familiar set of commands. We’ll see :slight_smile:

1 Like

Here are my improvements. I’ll be adding to these over the next week.

Change password prompt
Something to change a users password as opposed to just resetting it with a link. This is fairly straightforward to do but if its already done all the better.

Social login
Might as well have this ready to go. Also it would be good to at least add a user in the users row for Facebook login. We could then allow the user to fill in their details at a later date.

1 Like

@bridget Yes… I’ve been using the same ugly customisation every time I’ve used Anvil. (“ugly”: As in I’m annoyed every time I work with it because its a clumsy workaround compared to other implementations I’ve used/built.)

In the era of increased privacy concerns, GDPR compliance, and deeper integration with third party services requiring OAuth Credentials… I’m just not interested in building any of that stuff myself when services like Auth0, Okta, KeyCloak, etc, do it for me. I can let the user create an Auth0 account with whatever credentials/social method they like, then when it comes time to correlate their account with Discord, Patreon, Twitter, or whatever else I need, I can redirect them through Auth0 to securely manage that and then just request tokens as I need them or the user data I need directly from the from Auth0 user profile data.

As I mentioned Supporting Auth0.com and/or OpenID Connect? , I was sad to see that I couldn’t finally just do this the right way when Anvil open sourced the server, and I continue to be frustrated by the entire Users/Authentication experience with Anvil.

I’m also not the only one looking for this experience to be better.

  • https://anvil.works/forum/t/more-oauth-third-parties/4614 (I can’t post more than 2 links.)

I am currently using the project and found that while it is awesome, very easy to customize and I learn a lot from it, to be honest, there is still room for improvement.

It is really appreciate that the complete solution, a kind of opinionated framework , is provided with log out, change password UI, navigation, protected page, data access layer, best practice for performance (the data stored in a cache) since at the end of the day, these functions will one way or another developed with or without best practices.

Yes! I have used the Custom Sign Up flow project many times, and would love if it got an overhaul. Primarily, I want to be able to collect additional information about the user when they sign up.

Couple use cases in particular:

  • marketplace app where I want the user to be able to indicate what type of user they are (supply or demand)
  • user profile information - profile picture, username, contact information, social links, etc.

I love the users feature and use it to send commands to different machines depending on who is signed in

def send_command(command):
  currentCommand = code_to_ascii(command)
  if (anvil.users.get_user())['email'] == "mail@michaellavers.com":
    anvil.server.call_s(("incomingCommand" + app_tables.variables.get(variable='ml_aston_number')['value']), currentCommand)
  else:
    anvil.server.call_s(("incomingCommand" + app_tables.variables.get(variable='aston_number')['value']), currentCommand)

with another app I have “admin” rights and “producer” rights and it works really well!