From 62d1cf467aba289df18fe17a9913d253e2465386 Mon Sep 17 00:00:00 2001 From: Chris Tran Date: Thu, 2 Jan 2025 15:09:58 -0600 Subject: [PATCH] feat!: requires kwargs for magic link methods --- lib/passageidentity/auth.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/passageidentity/auth.rb b/lib/passageidentity/auth.rb index 0a83c6a..22f8262 100644 --- a/lib/passageidentity/auth.rb +++ b/lib/passageidentity/auth.rb @@ -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' @@ -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' @@ -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