Skip to content

Commit

Permalink
feat!: requires kwargs for magic link methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ctran88 committed Jan 2, 2025
1 parent 540c9be commit 62d1cf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/passageidentity/auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def validate_jwt(jwt:)
claims[0]['sub']
end

def create_magic_link_with_email(email, type, send, opts = {})
def create_magic_link_with_email(email:, type:, send:, opts: {})
args = {}
args['email'] = email
args['channel'] = 'email'
Expand All @@ -46,7 +46,7 @@ def create_magic_link_with_email(email, type, send, opts = {})
create_magic_link(args, opts)
end

def create_magic_link_with_phone(phone, type, send, opts = {})
def create_magic_link_with_phone(phone:, type:, send:, opts: {})
args = {}
args['phone'] = phone
args['channel'] = 'phone'
Expand All @@ -56,7 +56,7 @@ def create_magic_link_with_phone(phone, type, send, opts = {})
create_magic_link(args, opts)
end

def create_magic_link_with_user(user_id, channel, type, send, opts = {})
def create_magic_link_with_user(user_id:, channel:, type:, send:, opts: {})
raise ArgumentError, "channel must be either 'email' or 'phone'" unless %w[
email
phone
Expand Down

0 comments on commit 62d1cf4

Please sign in to comment.