passwordless 1.0.0.beta1 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -29
- data/app/views/passwordless/sessions/new.html.erb +3 -1
- data/app/views/passwordless/sessions/show.html.erb +2 -2
- data/config/locales/en.yml +2 -0
- data/lib/passwordless/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52e22eadd44664d2cf56ea239705a56a897ee1d3cb995344e6b9f25c1f984d26
|
4
|
+
data.tar.gz: '02787fc37322c5bb248574ea1a59e384d6a1fdc9de42e680b7bfb2711bed2983'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c70a17498a9690a146bb69b8bcaf37f1e1755ee0eef3b82ce8751ca7d29a98aa21e144bca49e8f8ac9ab2ad78d4e3ea1808508be5b31cbb2f6ec295de6a4aeb
|
7
|
+
data.tar.gz: 6a4085ab2ac296b9967c26e77af43ddf0f77cf2fad716623be4400089f17f27adabd8fb09223ff055692ac84e6385944da4a2e15597b490648b5ec0da0240972
|
data/README.md
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
**NOTE:** Passwordless is currently going through some breaking changes. Be aware that the docs in `master` aren't necessarily the same as for you installed version.
|
2
|
-
|
3
|
-
---
|
4
|
-
|
5
1
|
<p align='center'>
|
6
2
|
<img src='https://s3.brnbw.com/Passwordless-title-gaIVkX0sPg.svg' alt='Passwordless' />
|
7
3
|
<br />
|
@@ -10,34 +6,10 @@
|
|
10
6
|
|
11
7
|
[![CI](https://github.com/mikker/passwordless/actions/workflows/ci.yml/badge.svg)](https://github.com/mikker/passwordless/actions/workflows/ci.yml) [![Rubygems](https://img.shields.io/gem/v/passwordless.svg)](https://rubygems.org/gems/passwordless) [![codecov](https://codecov.io/gh/mikker/passwordless/branch/master/graph/badge.svg)](https://codecov.io/gh/mikker/passwordless)
|
12
8
|
|
13
|
-
Add authentication to your Rails app without all the icky-ness of passwords.
|
9
|
+
Add authentication to your Rails app without all the icky-ness of passwords. _Magic link_ authentication, if you will. We call it _passwordless_.
|
14
10
|
|
15
11
|
---
|
16
12
|
|
17
|
-
## Table of Contents
|
18
|
-
|
19
|
-
<!--toc:start-->
|
20
|
-
|
21
|
-
- [Table of Contents](#table-of-contents)
|
22
|
-
- [Installation](#installation)
|
23
|
-
- [Usage](#usage)
|
24
|
-
- [Getting the current user, restricting access, the usual](#getting-the-current-user-restricting-access-the-usual)
|
25
|
-
- [Providing your own templates](#providing-your-own-templates)
|
26
|
-
- [Registering new users](#registering-new-users)
|
27
|
-
- [URLs and links](#urls-and-links)
|
28
|
-
- [Configuration](#configuration)
|
29
|
-
- [Delivery method](#delivery-method)
|
30
|
-
- [Token generation](#token-generation)
|
31
|
-
- [Timeout and Expiry](#timeout-and-expiry)
|
32
|
-
- [Redirection after sign-in](#redirection-after-sign-in)
|
33
|
-
- [Looking up the user](#looking-up-the-user)
|
34
|
-
- [Claiming tokens](#claiming-tokens)
|
35
|
-
- [Test helpers](#test-helpers)
|
36
|
-
- [Security considerations](#security-considerations)
|
37
|
-
- [Alternatives](#alternatives)
|
38
|
-
- [License](#license)
|
39
|
-
<!--toc:end-->
|
40
|
-
|
41
13
|
## Installation
|
42
14
|
|
43
15
|
Add to your bundle and copy over the migrations:
|
@@ -47,6 +19,10 @@ $ bundle add passwordless
|
|
47
19
|
$ bin/rails passwordless:install:migrations
|
48
20
|
```
|
49
21
|
|
22
|
+
### Upgrading
|
23
|
+
|
24
|
+
See [Upgrading to Passwordless 1.0](docs/upgrading_to_1_0.md) for more details.
|
25
|
+
|
50
26
|
## Usage
|
51
27
|
|
52
28
|
Passwordless creates a single model called `Passwordless::Session`. It doesn't come with its own `User` model, it expects you to create one:
|
@@ -1,6 +1,8 @@
|
|
1
1
|
<%= form_with(model: @session, url: url_for(action: 'new'), data: { turbo: 'false' }) do |f| %>
|
2
2
|
<% email_field_name = :"passwordless[#{email_field}]" %>
|
3
|
-
<%= f.label email_field_name,
|
3
|
+
<%= f.label email_field_name,
|
4
|
+
t("passwordless.sessions.new.email.label"),
|
5
|
+
for: "passwordless_#{email_field}" %>
|
4
6
|
<%= text_field_tag email_field_name,
|
5
7
|
params.fetch(email_field_name, nil),
|
6
8
|
required: true,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= form_with(model: @session, url: url_for(action: 'update'), scope: 'passwordless', method: 'patch', data: { turbo: false }) do |f| %>
|
2
|
-
<%= f.label :token %>
|
2
|
+
<%= f.label :token, autocomplete: "off" %>
|
3
3
|
<%= f.text_field :token %>
|
4
|
-
<%= f.submit "
|
4
|
+
<%= f.submit t(".confirm") %>
|
5
5
|
<% end %>
|
data/config/locales/en.yml
CHANGED
@@ -11,6 +11,8 @@ en:
|
|
11
11
|
email_sent: "We've sent you an email with a secret token"
|
12
12
|
not_found: "We couldn't find a user with that email address"
|
13
13
|
error: "An error occured"
|
14
|
+
show:
|
15
|
+
confirm: "Confirm"
|
14
16
|
errors:
|
15
17
|
invalid_token: "Token is invalid"
|
16
18
|
session_expired: "Your session has expired, please sign in again."
|
data/lib/passwordless/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: passwordless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikkel Malmberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -86,11 +86,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
88
|
requirements:
|
89
|
-
- - "
|
89
|
+
- - ">="
|
90
90
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
91
|
+
version: '0'
|
92
92
|
requirements: []
|
93
|
-
rubygems_version: 3.4.
|
93
|
+
rubygems_version: 3.4.21
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Add authentication to your app without all the ickyness of passwords.
|