lib/workos/passwordless.rb in workos-4.1.0 vs lib/workos/passwordless.rb in workos-4.2.0
- old
+ new
@@ -1,7 +1,6 @@
# frozen_string_literal: true
-# typed: true
require 'net/http'
module WorkOS
# The Passwordless module provides convenience methods for working with
@@ -9,11 +8,10 @@
# API key.
#
# @see https://workos.com/docs/sso/configuring-magic-link
module Passwordless
class << self
- extend T::Sig
include Client
# Create a Passwordless Session.
#
# @param [Hash] options A hash with options for the session
@@ -31,16 +29,10 @@
# @option options [String] redirect_uri The URI where users are directed
# after completing the authentication step. Must match a
# configured redirect URI on your WorkOS dashboard.
#
# @return Hash
- sig do
- params(
- options: Hash,
- ).returns(WorkOS::Types::PasswordlessSessionStruct)
- end
-
def create_session(options)
response = execute_request(
request: post_request(
path: '/passwordless/sessions',
auth: true,
@@ -62,15 +54,9 @@
#
# @param [String] session_id The unique identifier of the Passwordless
# Session to send an email for.
#
# @return Hash
- sig do
- params(
- session_id: String,
- ).returns(T::Hash[String, T::Boolean])
- end
-
def send_session(session_id)
response = execute_request(
request: post_request(
path: "/passwordless/sessions/#{session_id}/send",
auth: true,