stytch 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/stytch/magic_links.rb +15 -0
- data/lib/stytch/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: c6f511de04dc81d999863698f74e78e602ef56b0ad69ebeda06fba44d30066be
         | 
| 4 | 
            +
              data.tar.gz: 6c167abff08d5fc5c418499443bf030b95bb5d8a8a2185bb29729372abc42011
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 2471cf9eba300cbd8110f23a260b7e926f4fc33ed8b19af55e7c8a9f90457ec24823d95b86b3116912473cef5b45219491e445d3e83c6a1b2809fba6e7a53a6f
         | 
| 7 | 
            +
              data.tar.gz: 61e5e6e89811f4bb5ba94c1bf2c004ce411c5de6c6f3025761fb99310ded9810d5acbdbad507f8a42ef1baaafdbffdd1d1c433f3423e6e05c63c556ced63c7f2
         | 
    
        data/lib/stytch/magic_links.rb
    CHANGED
    
    | @@ -16,6 +16,21 @@ module Stytch | |
| 16 16 | 
             
                  @email = Stytch::MagicLinks::Email.new(@connection)
         | 
| 17 17 | 
             
                end
         | 
| 18 18 |  | 
| 19 | 
            +
                def create(
         | 
| 20 | 
            +
                  user_id:,
         | 
| 21 | 
            +
                  expiration_minutes: nil,
         | 
| 22 | 
            +
                  attributes: {}
         | 
| 23 | 
            +
                )
         | 
| 24 | 
            +
                  request = {
         | 
| 25 | 
            +
                    user_id: user_id
         | 
| 26 | 
            +
                  }
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                  request[:expiration_minutes] = expiration_minutes unless expiration_minutes.nil?
         | 
| 29 | 
            +
                  request[:attributes] = attributes if attributes != {}
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                  post_request(PATH.to_s, request)
         | 
| 32 | 
            +
                end
         | 
| 33 | 
            +
             | 
| 19 34 | 
             
                def authenticate(
         | 
| 20 35 | 
             
                  token:,
         | 
| 21 36 | 
             
                  attributes: {},
         | 
    
        data/lib/stytch/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: stytch
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2. | 
| 4 | 
            +
              version: 2.4.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - stytch
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021-09- | 
| 11 | 
            +
            date: 2021-09-10 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: faraday
         |