canvas_lti_third_party_cookies 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/controllers/concerns/{lti_third_party_cookies → canvas_lti_third_party_cookies}/safari_launch.rb +4 -4
- data/app/views/{lti_third_party_cookies → canvas_lti_third_party_cookies}/full_window_launch.erb +1 -0
- data/app/views/{lti_third_party_cookies → canvas_lti_third_party_cookies}/request_storage_access.erb +2 -0
- data/lib/canvas_lti_third_party_cookies.rb +4 -0
- data/lib/canvas_lti_third_party_cookies/engine.rb +5 -0
- data/lib/canvas_lti_third_party_cookies/version.rb +3 -0
- metadata +8 -8
- data/lib/lti_third_party_cookies.rb +0 -5
- data/lib/lti_third_party_cookies/engine.rb +0 -5
- data/lib/lti_third_party_cookies/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4aee3fcacd57feaf3915e824211dce8afde5350cc286b5fb728cb37c9b92836f
|
4
|
+
data.tar.gz: 21383e419b634141097ca3c593e3cd885c50b1271d124ea16fe075b1479486c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2dcf8ce2b2ae43d7e94e5f1a105bc93a9aa2a11bd374f2eb82516f4c029a6a3329cc6950eef9a59f1bcdc3e7be7b6f8b5571b26c83798e20121d9c67f38c9aa2
|
7
|
+
data.tar.gz: e87c29658574fe2f3a3cfa4e0006ce0bd05860d28b4c7731306a0b2f8c4fceffbd4d319859c4795b3e433721fcf943331374b8816481b9ed8f2045b6ce9a5bdc
|
data/README.md
CHANGED
@@ -25,7 +25,7 @@ below to run on that action, and pass the data needed.
|
|
25
25
|
Usually, only query parameters *or* form data is needed, not both.
|
26
26
|
|
27
27
|
```ruby
|
28
|
-
include
|
28
|
+
include CanvasLtiThirdPartyCookies::SafariLaunch
|
29
29
|
#...
|
30
30
|
before_action -> {
|
31
31
|
handle_safari_launch(launch_url: action_url, launch_params: { foo: bar }, launch_data: { foo: baz })
|
@@ -37,7 +37,7 @@ Add this line to your application's Gemfile:
|
|
37
37
|
|
38
38
|
```ruby
|
39
39
|
# Set 3rd party cookies in Safari
|
40
|
-
gem 'canvas_lti_third_party_cookies'
|
40
|
+
gem 'canvas_lti_third_party_cookies'
|
41
41
|
```
|
42
42
|
|
43
43
|
And then execute:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'browser'
|
2
2
|
|
3
|
-
module
|
3
|
+
module CanvasLtiThirdPartyCookies::SafariLaunch
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
# this needs to be called as a before_action on the route that launches the tool
|
@@ -12,7 +12,7 @@ module LtiThirdPartyCookies::SafariLaunch
|
|
12
12
|
# the `launch_data` parameter is optional, and should contain
|
13
13
|
# all needed form data that the tool requires to launch.
|
14
14
|
# example:
|
15
|
-
# include
|
15
|
+
# include CanvasLtiThirdPartyCookies::SafariLaunch
|
16
16
|
# ...
|
17
17
|
# before_action -> {
|
18
18
|
# handle_safari_launch(launch_url: action_url, launch_params: { foo: bar }, launch_data: { foo: baz })
|
@@ -36,7 +36,7 @@ module LtiThirdPartyCookies::SafariLaunch
|
|
36
36
|
# will launch the tool again within an iframe in Canvas. (#3)
|
37
37
|
if params[:platform_redirect_url].present?
|
38
38
|
return render(
|
39
|
-
'
|
39
|
+
'canvas_lti_third_party_cookies/full_window_launch',
|
40
40
|
locals: { platform_redirect_url: params[:platform_redirect_url] }
|
41
41
|
)
|
42
42
|
end
|
@@ -48,7 +48,7 @@ module LtiThirdPartyCookies::SafariLaunch
|
|
48
48
|
# Pass along any parameters provided by the tool that are needed to launch correctly,
|
49
49
|
# and tell the tool that it has Storage Access.
|
50
50
|
render(
|
51
|
-
'
|
51
|
+
'canvas_lti_third_party_cookies/request_storage_access',
|
52
52
|
locals: {
|
53
53
|
launch_url: launch_url,
|
54
54
|
relaunch_url: relaunch_url(launch_url, launch_params),
|
data/app/views/{lti_third_party_cookies → canvas_lti_third_party_cookies}/full_window_launch.erb
RENAMED
@@ -70,6 +70,7 @@
|
|
70
70
|
<div class="flex-item">
|
71
71
|
<p>Occasionally, Safari requires you to launch this app outside of Canvas before logging in.</p>
|
72
72
|
<p>This setup is now complete, and Canvas can now relaunch this app.</p>
|
73
|
+
<p>In some cases, you may need to relaunch this app yourself.</p>
|
73
74
|
</div>
|
74
75
|
|
75
76
|
<div class="flex-item">
|
data/app/views/{lti_third_party_cookies → canvas_lti_third_party_cookies}/request_storage_access.erb
RENAMED
@@ -99,6 +99,8 @@
|
|
99
99
|
<p>Safari requires your interaction with this app before logging you in.</p>
|
100
100
|
<p>A dialog may appear asking you to allow this app to use cookies while browsing Canvas.</p>
|
101
101
|
<p>For the best experience, click Allow.</p>
|
102
|
+
<p>A dialog may also appear asking you to navigate somewhere else.</p>
|
103
|
+
<p>If it does, save your work first and then click Leave Page.</p>
|
102
104
|
</div>
|
103
105
|
|
104
106
|
<div class="flex-item">
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: canvas_lti_third_party_cookies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Xander Moffatt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -75,13 +75,13 @@ files:
|
|
75
75
|
- LICENSE
|
76
76
|
- README.md
|
77
77
|
- Rakefile
|
78
|
-
- app/controllers/concerns/
|
78
|
+
- app/controllers/concerns/canvas_lti_third_party_cookies/safari_launch.rb
|
79
|
+
- app/views/canvas_lti_third_party_cookies/full_window_launch.erb
|
80
|
+
- app/views/canvas_lti_third_party_cookies/request_storage_access.erb
|
79
81
|
- app/views/layouts/application.html.erb
|
80
|
-
-
|
81
|
-
-
|
82
|
-
- lib/
|
83
|
-
- lib/lti_third_party_cookies/engine.rb
|
84
|
-
- lib/lti_third_party_cookies/version.rb
|
82
|
+
- lib/canvas_lti_third_party_cookies.rb
|
83
|
+
- lib/canvas_lti_third_party_cookies/engine.rb
|
84
|
+
- lib/canvas_lti_third_party_cookies/version.rb
|
85
85
|
homepage: https://gerrit.instructure.com/#/admin/projects/lti_third_party_cookies
|
86
86
|
licenses:
|
87
87
|
- MIT
|