jeremyevans / rodauth

Ruby's Most Advanced Authentication Framework
http://rodauth.jeremyevans.net
MIT License
1.69k stars 95 forks source link

Add :params option for custom parameters to internal_request feature #170

Closed janko closed 3 years ago

janko commented 3 years ago

This allows the caller to pass additional custom parameters that are not known to Rodauth to internal requests. For example, if we've added an additional name field to the create account form for the user to enter their full name, we might want to pass the name parameter into the internal request as well. We can now do this via :params:

App.rodauth.create_account(
  login: "user@example.com",
  password: "secret",
  params: { "name" => "John Smith" }
)
jeremyevans commented 3 years ago

This looks good. Thanks for working on it!

jeremyevans commented 3 years ago

Cherry-picked at 7f2a37780210694160fa418cf006109b99849739