stytch 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e297565a826ab7318a1471d3b4286bba6d8a58c1f335bb5fe39b31355dad8bb0
4
- data.tar.gz: 6d5873eed220a0d85539b0264408757451ce18e106dd58cf5b747543697808cc
3
+ metadata.gz: f10d2ac983b6812590a7d1d01fa649ea9a84bcdbff28cdc34b47dc6e075ebcaf
4
+ data.tar.gz: '08dbadda02435370eceb0d66533a11631c05ab615e646a0d6fa77d58fb579bdb'
5
5
  SHA512:
6
- metadata.gz: bcec30dcf3b4e89293bb41f05202aca38b6b46d2a42531d9cae2471a1b6c8a7052bca1aa962a4017a2486b92a0f1c24b7634c59c3ed8725f3763d17a6162cef7
7
- data.tar.gz: 36d398ca7e3a987cb94efa45875d17473dfdd348266474e9c2f29ec6a1491a0bf001a1960f9ed712f946904daf0265f79e851689a7ff9cb9cf6e546d843d64af
6
+ metadata.gz: 5d084490ad18ef02b1f9215356be00e987379b773652a42c22e95058ff38631e8d0d020a93361f1b70c56041451d25e71daf3e6b896e27022185d46045b4fdd0
7
+ data.tar.gz: e62da9085f0263fe06c5134747f2b5a5992d6163333a90197e1ab0e1aa2379e7a8d73124fe2d93c443ca1431d36447b64735e2086edc1e73eebfd359b33e8d25
data/CODEOWNERS ADDED
@@ -0,0 +1,7 @@
1
+ # Stytch code owners file
2
+
3
+ # These owners will be the default owners for everything in
4
+ # the repo. Unless a later match takes precedence,
5
+ # @stytchauth/client-libraries will be requested for
6
+ # review when someone opens a pull request.
7
+ * @stytchauth/client-libraries
data/CODE_OF_CONDUCT.md CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at alex@stytch.com. All
58
+ reported by contacting the project team at support@stytch.com. All
59
59
  complaints will be reviewed and investigated and will result in a response that
60
60
  is deemed necessary and appropriate to the circumstances. The project team is
61
61
  obligated to maintain confidentiality with regard to the reporter of an incident.
data/DEVELOPMENT.md ADDED
@@ -0,0 +1,18 @@
1
+ # Development
2
+
3
+ Thanks for contributing to Stytch's Ruby library! If you run into trouble, find us in [Slack].
4
+
5
+ ## Setup
6
+
7
+ 1. Clone this repo.
8
+ 2. To test your changes locally, update your GEMFILE with `gem 'stytch', path: '../stytch'` where `../stytch` is the path to your cloned copy of stytch-ruby.
9
+
10
+ ## Issues and Pull Requests
11
+
12
+ Please file issues in this repo. We don't have an issue template yet, but for now, say whatever you think is important!
13
+
14
+ If you have non-trivial changes you'd like us to incorporate, please open an issue first so we can discuss the changes before starting on a pull request. (It's fine to start with the PR for a typo or simple bug.) If we think the changes align with the direction of the project, we'll either ask you to open the PR or assign someone on the Stytch team to make the changes.
15
+
16
+ When you're ready for someone to look at your issue or PR, assign `@stytchauth/client-libraries` (GitHub should do this automatically). If we don't acknowledge it within one business day, please escalate it by tagging `@stytchauth/engineering` in a comment or letting us know in [Slack].
17
+
18
+ [Slack]: https://join.slack.com/t/stytch/shared_invite/zt-nil4wo92-jApJ9Cl32cJbEd9esKkvyg
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
- # Stytch
1
+ # Stytch Ruby Gem
2
2
 
3
- Welcome to the official Stytch ruby gem! This gem provides easy access to Stytch's API.
3
+ The Stytch Ruby gem makes it easy to use the Stytch user infrastructure API in Ruby applications.
4
4
 
5
- ## Installation
5
+ It pairs well with the Stytch [Web SDK](https://www.npmjs.com/package/@stytch/stytch-js) or your own custom authentication flow.
6
+
7
+ ## Install
6
8
 
7
9
  Add this line to your application's Gemfile:
8
10
 
@@ -20,25 +22,61 @@ Or install it yourself as:
20
22
 
21
23
  ## Usage
22
24
 
23
- To make a request, first create a Stytch Client.
24
- Set `env` to either `:test` or `:api` depending on which environment you want to use.
25
- ```
25
+ You can find your API credentials in the [Stytch Dashboard](https://stytch.com/dashboard/api-keys).
26
+
27
+ Create an API client:
28
+ ```ruby
26
29
  client = Stytch::Client.new(
27
- env: :test,
30
+ env: :test, # available environments are :test and :live
28
31
  project_id: "***",
29
32
  secret: "***"
30
33
  )
31
34
  ```
32
35
 
33
- Then make desired API call.
36
+ Send a magic link by email:
37
+ ```ruby
38
+ client.magic_links.email.login_or_create(
39
+ email: "sandbox@stytch.com",
40
+ login_magic_link_url: "https://example.com/login",
41
+ signup_magic_link_url: "https://example.com/signup",
42
+ )
34
43
  ```
35
- client.users.get(user_id: user_id)
44
+
45
+ Authenticate the token from the magic link:
46
+ ```ruby
47
+ client.magic_links.authenticate(
48
+ token: "DOYoip3rvIMMW5lgItikFK-Ak1CfMsgjuiCyI7uuU94=",
49
+ )
36
50
  ```
37
51
 
52
+ ## Handling Errors
53
+
54
+ When possible the response will contain an `error_type` and an `error_message` that can be used to distinguish errors.
55
+
56
+ Learn more about errors in the [docs](https://stytch.com/docs/api/errors).
57
+
58
+ ## Documentation
59
+
60
+ See example requests and responses for all the endpoints in the [Stytch API Reference](https://stytch.com/docs/api).
61
+
62
+ Follow one of the [integration guides](https://stytch.com/docs/guides) or start with one of our [example apps](https://stytch.com/docs/example-apps).
63
+
64
+ ## Support
65
+
66
+ If you've found a bug, [open an issue](https://github.com/stytchauth/stytch-ruby/issues/new)!
67
+
68
+ If you have questions or want help troubleshooting, join us in [Slack](https://join.slack.com/t/stytch/shared_invite/zt-nil4wo92-jApJ9Cl32cJbEd9esKkvyg) or email support@stytch.com.
69
+
70
+ If you've found a security vulnerability, please follow our [responsible disclosure instructions](https://stytch.com/docs/security).
71
+
72
+ ## Development
73
+
74
+ See [DEVELOPMENT.md](DEVELOPMENT.md)
75
+
38
76
  ## License
39
77
 
40
78
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
41
79
 
42
80
  ## Code of Conduct
43
81
 
44
- Everyone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/stytchauth/stytch-ruby/blob/main/CODE_OF_CONDUCT.md).
82
+ Everyone interacting in the Stytch project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stytch
4
- VERSION = '2.1.0'
4
+ VERSION = '2.1.1'
5
5
  end
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.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - stytch
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -60,7 +60,9 @@ files:
60
60
  - ".gitignore"
61
61
  - ".rspec"
62
62
  - ".travis.yml"
63
+ - CODEOWNERS
63
64
  - CODE_OF_CONDUCT.md
65
+ - DEVELOPMENT.md
64
66
  - Gemfile
65
67
  - LICENSE.txt
66
68
  - README.md