diff --git a/ruby-admin-portal-example/Gemfile b/ruby-admin-portal-example/Gemfile
index 79504ae..ff2fcde 100644
--- a/ruby-admin-portal-example/Gemfile
+++ b/ruby-admin-portal-example/Gemfile
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
gem 'dotenv', '2.7.6'
gem 'sinatra', '2.2.0'
-gem 'workos', '2.5.0'
+gem 'workos', '2.12.0'
diff --git a/ruby-audit-logs-example/README.md b/ruby-audit-logs-example/README.md
index 4f5a760..d0f949c 100644
--- a/ruby-audit-logs-example/README.md
+++ b/ruby-audit-logs-example/README.md
@@ -1,6 +1,6 @@
# ruby-audit-logs-example
-An example Ruby application demonstrating how to use the [WorkOS Ruby SDK](https://github.com/workos/workos-ruby) to send and retrieve Audit Log events. This example is not meant to show a real-world example of an Audit Logs implementation, but rather to show concrete examples of how events can be sent using the Python SDK.
+An example Ruby application demonstrating how to use the [WorkOS Ruby SDK](https://github.com/workos/workos-ruby) to send and retrieve Audit Log events. This example is not meant to show a real-world example of an Audit Logs implementation, but rather to show concrete examples of how events can be sent using the Ruby SDK.
## Clone and Install
@@ -10,7 +10,6 @@ An example Ruby application demonstrating how to use the [WorkOS Ruby SDK](https
# HTTPS
$ git clone https://github.com/workos/ruby-example-applications.git
```
-
2. Navigate to the Audit Logs example app within the cloned repo and install dependencies:
@@ -40,10 +39,24 @@ Action title: "user.connection_deleted" | Target type: "team"
4. To obtain a CSV of the Audit Log events that were sent for the last 30 days, click the "Export Events" button. This will bring you to a new page where you can download the events. Downloading the events is a 2 step process. First you need to create the report by clicking the "Generate CSV" button. Then click the "Access CSV" button to download a CSV of the Audit Log events for the selected Organization for the past 30 days.
## Run the app
+
```sh
ruby app.rb
```
+## Audit Logs Setup with WorkOS
+
+5. Follow the [Audit Logs configuration steps](https://workos.com/docs/audit-logs/emit-an-audit-log-event/sign-in-to-your-workos-dashboard-account-and-configure-audit-log-event-schemas) to set up the following 2 events that are sent with this example:
+
+Action title: "user.organization_set" | Target type: "team"
+Action title: "user.organization_deleted" | Target type: "team"
+
+6. Configure the Admin Portal Redirect URI.
+
+Navigate to the Configuration tab in your WorkOS Dshboard. From there click the Admin Portal tab. Click the Edit Admin Portal Redirect Links button and add "http://localhost:8000" to the "When clicking the back navigation, return users to:" input, then click Save Redirect Links.
+
+7. To obtain a CSV of the Audit Log events that were sent for the last 30 days, click the "Export Events" tab. This will bring you to a new page where you can download the events. Downloading the events is a 2 step process. First you need to create the report by clicking the "Generate CSV" button. Then click the "Access CSV" button to download a CSV of the Audit Log events for the selected Organization for the past 30 days. You may also adjust the time range using the form inputs.
+
## Need help?
If you get stuck and aren't able to resolve the issue by reading our API reference or tutorials, you can reach out to us at support@workos.com and we'll lend a hand.
diff --git a/ruby-audit-logs-example/app.rb b/ruby-audit-logs-example/app.rb
index bb6bbc5..b576013 100644
--- a/ruby-audit-logs-example/app.rb
+++ b/ruby-audit-logs-example/app.rb
@@ -4,8 +4,6 @@
require 'sinatra'
require 'workos'
require 'date'
-require_relative 'audit_log_events.rb'
-require 'pry'
# Pull API key and Client ID from ENV variable
WorkOS.key = ENV['WORKOS_API_KEY']
diff --git a/ruby-audit-logs-example/audit_log_events.rb b/ruby-audit-logs-example/audit_log_events.rb
deleted file mode 100644
index 5672608..0000000
--- a/ruby-audit-logs-example/audit_log_events.rb
+++ /dev/null
@@ -1,96 +0,0 @@
-require 'date'
-
-$user_signed_in = {
- "action": "user.signed_in",
- "occurred_at": DateTime.now,
- "actor": {
- "type": "user",
- "id": "user_01GBNJC3MX9ZZJW1FSTF4C5938",
- },
- "targets": [
- {
- "type": "team",
- "id": "team_01GBNJD4MKHVKJGEWK42JNMBGS",
- },
- ],
- "context": {
- "location": "123.123.123.123",
- "user_agent": "Chrome/104.0.0.0",
- },
-}
-
-$user_logged_out = {
- "action": "user.logged_out",
- "occurred_at": DateTime.now,
- "actor": {
- "type": "user",
- "id": "user_01GBNJC3MX9ZZJW1FSTF4C5938",
- },
- "targets": [
- {
- "type": "team",
- "id": "team_01GBNJD4MKHVKJGEWK42JNMBGS",
- },
- ],
- "context": {
- "location": "123.123.123.123",
- "user_agent": "Chrome/104.0.0.0",
- },
-}
-
-$user_organization_set = {
- "action": "user.organization_set",
- "occurred_at": DateTime.now,
- "actor": {
- "type": "user",
- "id": "user_01GBNJC3MX9ZZJW1FSTF4C5938",
- },
- "targets": [
- {
- "type": "team",
- "id": "team_01GBNJD4MKHVKJGEWK42JNMBGS",
- },
- ],
- "context": {
- "location": "123.123.123.123",
- "user_agent": "Chrome/104.0.0.0",
- },
-}
-
-$user_organization_deleted = {
- "action": "user.organization_deleted",
- "occurred_at": DateTime.now,
- "actor": {
- "type": "user",
- "id": "user_01GBNJC3MX9ZZJW1FSTF4C5938",
- },
- "targets": [
- {
- "type": "team",
- "id": "team_01GBNJD4MKHVKJGEWK42JNMBGS",
- },
- ],
- "context": {
- "location": "123.123.123.123",
- "user_agent": "Chrome/104.0.0.0",
- },
-}
-
-$user_connection_deleted = {
- "action": "user.connection_deleted",
- "occurred_at": DateTime.now,
- "actor": {
- "type": "user",
- "id": "user_01GBNJC3MX9ZZJW1FSTF4C5938",
- },
- "targets": [
- {
- "type": "team",
- "id": "team_01GBNJD4MKHVKJGEWK42JNMBGS",
- },
- ],
- "context": {
- "location": "123.123.123.123",
- "user_agent": "Chrome/104.0.0.0",
- },
-}
diff --git a/ruby-audit-logs-example/views/login.erb b/ruby-audit-logs-example/views/login.erb
index 8aeac84..767a75b 100644
--- a/ruby-audit-logs-example/views/login.erb
+++ b/ruby-audit-logs-example/views/login.erb
@@ -1,10 +1,3 @@
-
-
-
-
-
-
-
diff --git a/ruby-directory-sync-example/Gemfile.lock b/ruby-directory-sync-example/Gemfile.lock
index e086104..5a34d6d 100644
--- a/ruby-directory-sync-example/Gemfile.lock
+++ b/ruby-directory-sync-example/Gemfile.lock
@@ -1,8 +1,8 @@
GEM
remote: https://rubygems.org/
specs:
- addressable (2.8.0)
- public_suffix (>= 2.0.2, < 5.0)
+ addressable (2.8.1)
+ public_suffix (>= 2.0.2, < 6.0)
daemons (1.4.1)
dotenv (2.7.6)
em-websocket (0.3.8)
@@ -11,8 +11,8 @@ GEM
eventmachine (1.2.7)
mustermann (1.1.2)
ruby2_keywords (~> 0.0.1)
- public_suffix (4.0.7)
- rack (2.2.4)
+ public_suffix (5.0.1)
+ rack (2.2.6.4)
rack-protection (2.2.0)
rack
ruby2_keywords (0.0.5)
@@ -25,12 +25,12 @@ GEM
em-websocket (~> 0.3.6)
eventmachine
thin (>= 1.3.1, < 2.0.0)
- sorbet-runtime (0.5.10274)
+ sorbet-runtime (0.5.10741)
thin (1.8.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
- tilt (2.0.11)
+ tilt (2.1.0)
workos (2.5.0)
sorbet-runtime (~> 0.5)
diff --git a/ruby-directory-sync-example/app.rb b/ruby-directory-sync-example/app.rb
index 67a15d7..ddd706f 100644
--- a/ruby-directory-sync-example/app.rb
+++ b/ruby-directory-sync-example/app.rb
@@ -6,7 +6,6 @@
require 'workos'
require 'json'
require 'sinatra-websocket'
-require 'pry'
set :server, 'thin'
set :sockets, []
@@ -14,13 +13,39 @@
# Pull API key from ENV variable
WorkOS.key = ENV['WORKOS_API_KEY']
-get '/' do
- @directories_list = WorkOS::DirectorySync.list_directories
- @directories = @directories_list.data
+enable :sessions
+
+use(
+ Rack::Session::Cookie,
+ key: 'rack.session',
+ domain: 'localhost',
+ path: '/',
+ expire_after: 2_592_000,
+ secret: SecureRandom.hex(16)
+)
+get '/' do
+ before = params[:before]
+ after = params[:after]
+ puts before
+ puts after
+ if !before
+ @directories = WorkOS::DirectorySync.list_directories(
+ limit: 5
+ )
+ else
+ @directories = WorkOS::DirectorySync.list_directories(
+ limit: 5,
+ before: before,
+ after: after
+ )
+ end
+ @before = @directories.list_metadata["before"]
+ @after = @directories.list_metadata["after"]
erb :index, :layout => false
end
+
get '/directories/:id' do
@groups_list = WorkOS::DirectorySync.list_groups(directory: params[:id])
@groups = @groups_list.data
@@ -32,7 +57,7 @@
get '/users/:id' do
@user = WorkOS::DirectorySync.get_user(params[:id])
- @user_groups_list = WorkOS::DirectorySync.list_groups(user: params[:id])
+ @user_groups_list = WorkOS::DirectorySync.list_groups(user: params[:id], limit: 5)
@user_groups = @user_groups_list.data
erb :user
diff --git a/ruby-directory-sync-example/public/images/settings-2.svg b/ruby-directory-sync-example/public/images/settings-2.svg
new file mode 100644
index 0000000..b385fa5
--- /dev/null
+++ b/ruby-directory-sync-example/public/images/settings-2.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/ruby-directory-sync-example/public/images/workos_favicon.png b/ruby-directory-sync-example/public/images/workos_favicon.png
new file mode 100644
index 0000000..b5babc3
Binary files /dev/null and b/ruby-directory-sync-example/public/images/workos_favicon.png differ
diff --git a/ruby-directory-sync-example/public/styles/styles.css b/ruby-directory-sync-example/public/styles/styles.css
index c13ef00..0a53292 100644
--- a/ruby-directory-sync-example/public/styles/styles.css
+++ b/ruby-directory-sync-example/public/styles/styles.css
@@ -1,310 +1,345 @@
body {
- font-family: Inter, sans-serif;
- background-color: #f9f9fb;
-
-}
-
-.container_login {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin: auto;
- width: 30%;
+ font-family: Inter, sans-serif;
+ background-color: #f9f9fb;
}
-.container_login img {
- height: 150px;
+.flex {
+ display: flex;
+ justify-content: center;
}
-.container_login h1 {
- font-size: 65px;
- color: #111111;
- position: relative;
- bottom: 10px;
+.flex_column {
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
}
-.flex {
- display: flex;
- justify-content: center;
+.flex-start {
+ justify-content: flex-start;
}
-.flex_column {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
+.flex-end {
+ justify-content: flex-end;
}
.space-between {
- justify-content: space-between;
+ justify-content: space-between;
}
.width-75 {
- width: 75%;
+ width: 75%;
}
.width-40vw {
- width: 40vw;
- overflow: scroll;
- word-wrap: break-word;
+ width: 40vw;
+ overflow: scroll;
+ word-wrap: break-word;
}
-.width-95 {
- width: 95%;
+.width-65vw {
+ width: 65vw;
+}
+
+.width-70vw {
+ width: 70vw;
+}
+
+.width-100vw {
+ width: 100vw;
+}
+
+.height-70vh {
+ height: 70vh;
}
.container_success {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin: auto;
- width: 100%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ margin: auto;
+ width: 100%;
}
.heading_div {
- margin: 25px 0px 25px 0px;
+ margin: 25px 0px 25px 0px;
}
.heading_text_div {
- align-self: center;
+ align-self: center;
}
.container_success {
- display: flex;
- flex-direction: column;
- justify-content: center;
- margin: auto;
- width: 100%;
- background-size: cover;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ margin: auto;
+ width: 100%;
+ background-size: cover;
}
.button {
- background-color: #6363f1;
- border: 2px solid #6363f1;
- border-radius: 26px;
- color: white;
- padding: 8px 16px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- margin: 4px 2px;
- transition-duration: 0.4s;
- cursor: pointer;
- box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
+ background-color: #6363f1;
+ border: 2px solid #6363f1;
+ border-radius: 26px;
+ color: white;
+ padding: 8px 16px;
+ text-align: center;
+ text-decoration: none;
+ display: inline-block;
+ font-size: 16px;
+ margin: 4px 2px;
+ transition-duration: 0.4s;
+ cursor: pointer;
+ box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
}
.button-outline {
- background-color: #f9f9fb;
- color: #6363f1;
- padding: 8px 16px;
+ background-color: #f9f9fb;
+ color: #6363f1;
+ padding: 8px 16px;
}
.button:hover,
.button-outline:hover {
- background-color: #555555;
- border: 2px solid #555555;
- color: white;
+ background-color: #555555;
+ border: 2px solid #555555;
+ color: white;
}
.sales-button {
- margin-left: 10px;
+ margin-left: 10px;
}
-
-
h2,
h1 {
- text-align: center;
- color: #555555;
+ text-align: center;
+ color: #555555;
}
.logged_in_div_right {
- width: 60%;
- height: 90vh;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- position: relative;
- bottom: 10%;
- /* background-color: #f9f9fb; */
+ width: 60%;
+ height: 90vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ position: relative;
+ bottom: 10%;
+ /* background-color: #f9f9fb; */
}
.logged_in_div_left {
- width: 40%;
- height: 100vh;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: left;
- background-color: #f9f9fb;
- margin-left: 4vw;
+ width: 40%;
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: left;
+ background-color: #f9f9fb;
+ margin-left: 4vw;
}
.logged_in_div_left div {
- justify-content: left;
- position: relative;
- bottom: 20%;
+ justify-content: left;
+ position: relative;
+ bottom: 20%;
}
.logged_in_div_left h1 {
- color: #111111;
- font-size: 75px;
- text-align: left;
- margin-bottom: 0px;
- font-weight: normal;
- letter-spacing: -.05em;
+ color: #111111;
+ font-size: 75px;
+ text-align: left;
+ margin-bottom: 0px;
+ font-weight: normal;
+ letter-spacing: -0.05em;
}
.home-hero-gradient {
- background-image: linear-gradient(45deg, #a163f1, #6363f1 22%, #3498ea 40%, #40dfa3 67%, rgba(64, 223, 163, 0));
- background-size: 150% 100%;
- background-repeat: no-repeat;
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- background-clip: text;
- animation: intro-gradient 1.2s cubic-bezier(0.85, 0.26, 0.89, 0.93);
- animation-iteration-count: 1;
- animation-fill-mode: backwards;
- animation-delay: 0.4s;
- text-align: left;
- font-size: 75px;
- letter-spacing: -.05em;
- font-weight: normal;
- margin-top: 0px;
+ background-image: linear-gradient(
+ 45deg,
+ #a163f1,
+ #6363f1 22%,
+ #3498ea 40%,
+ #40dfa3 67%,
+ rgba(64, 223, 163, 0)
+ );
+ background-size: 150% 100%;
+ background-repeat: no-repeat;
+ -webkit-background-clip: text;
+ -webkit-text-fill-color: transparent;
+ background-clip: text;
+ animation: intro-gradient 1.2s cubic-bezier(0.85, 0.26, 0.89, 0.93);
+ animation-iteration-count: 1;
+ animation-fill-mode: backwards;
+ animation-delay: 0.4s;
+ text-align: left;
+ font-size: 75px;
+ letter-spacing: -0.05em;
+ font-weight: normal;
+ margin-top: 0px;
}
.title-text {
- margin-bottom: -50px;
+ margin-bottom: -50px;
}
.title-subtext {
- color: gray;
- line-height: 10px;
- margin-bottom: 15px;
- font-weight: 200;
+ color: gray;
+ line-height: 10px;
+ margin-bottom: 15px;
+ font-weight: 200;
}
.logged_in_div_left button {
- padding: 8px 22px;
- box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
+ padding: 8px 22px;
+ box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
}
.logged_in_div_right button {
- padding: 8px 22px;
- box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
+ padding: 8px 22px;
+ box-shadow: 0px 8px 15px rgba(0, 0, 0, 0.1);
}
div.text_box {
- background-color: #f9f9fb;
- width: 40vw;
- max-height: 30vh;
- padding: 10px;
- word-wrap: break-word;
- overflow: scroll;
- border-width: 3px;
- border-style: solid;
- border-image:
- linear-gradient(#a163f1, #6363f1 22%, #3498ea 40%, #40dfa3 67%, rgba(64, 223, 163, 0)) 0 100%;
+ background-color: #f9f9fb;
+ width: 40vw;
+ max-height: 30vh;
+ padding: 10px;
+ word-wrap: break-word;
+ overflow: scroll;
+ border-width: 3px;
+ border-style: solid;
+ border-image: linear-gradient(
+ #a163f1,
+ #6363f1 22%,
+ #3498ea 40%,
+ #40dfa3 67%,
+ rgba(64, 223, 163, 0)
+ )
+ 0 100%;
}
.logged_in_nav {
- display: flex;
- justify-content: space-between;
- background-color: #f9f9fb;
- height: 60px;
- padding: 15px 30px 15px 30px;
-
- z-index: 1000;
+ display: flex;
+ justify-content: space-between;
+ background-color: #f9f9fb;
+ height: 60px;
+ padding: 15px 30px 15px 30px;
+ width: 95vw;
}
.logged_in_nav p {
- padding: 4px 0px 0px 15px;
- line-height: 1;
- color: #29363d;
+ line-height: 1;
+ color: #29363d;
}
.logged_in_nav img {
- height: 50px;
-}
-
-.logged_in_nav img:hover {
- border: 2px solid #555555;
+ height: 50px;
}
.nav-item {
- color: black;
- border: 2px solid #f9f9fb;
- background-color: #f9f9fb;
- box-shadow: none;
- border-radius: 5px;
+ color: black;
+ border: 2px solid #f9f9fb;
+ background-color: #f9f9fb;
+ box-shadow: none;
+ border-radius: 5px;
}
.blog-nav-button {
- margin-right: 20px;
- background-color: #f9f9fb;
- border: 2px solid #f9f9fb;
+ margin-right: 20px;
+ background-color: #f9f9fb;
+ border: 2px solid #f9f9fb;
}
.directory-buttons {
- justify-content: space-between;
- width: 40vw;
+ justify-content: space-between;
+ width: 40vw;
}
.nav-item:hover {
- background-color: #f9f9fb;
- border: 2px solid #f9f9fb;
- color: #a6a4a4;
+ background-color: #f9f9fb;
+ border: 2px solid #f9f9fb;
+ color: #a6a4a4;
}
pre.prettyprint {
- border: none !important;
+ border: none !important;
}
ul {
- list-style-type: none;
- margin-right: 35px;
- text-decoration: none;
+ list-style-type: none;
+ margin-right: 35px;
+ text-decoration: none;
}
li {
- padding: 6px;
+ padding: 6px;
}
a:link {
- text-decoration: none;
+ text-decoration: none;
}
a:visited {
- text-decoration: none;
+ text-decoration: none;
}
li.even {
- background-color: rgb(228, 228, 228);
+ background-color: rgb(228, 228, 228);
}
.card {
- border: 1px solid #555555;
- border-radius: 10px;
- margin: 0px 15px 0px 15px;
- padding: 25px 50px;
- margin-bottom: 20px;
- text-align: center;
+ border: 1px solid #555555;
+ border-radius: 10px;
+ margin: 0px 15px 0px 15px;
+ padding: 25px 50px;
+ margin-bottom: 20px;
+ text-align: center;
}
.webhooks-container {
- width: 45vw;
- padding: 25px;
- max-height: 450px;
- overflow-y: scroll;
+ width: 45vw;
+ padding: 25px;
+ max-height: 450px;
+ overflow-y: scroll;
}
#clear_button_div {
-
- margin-bottom: 50px;
+ margin-bottom: 50px;
}
.hidden {
- display: none;
-}
\ No newline at end of file
+ display: none;
+}
+
+tr {
+ text-align: center;
+ border-bottom: 1px solid #ebebf2;
+}
+
+tr:hover {
+ background-color: #ebebf2;
+}
+
+table,
+td {
+ padding: 5px 40px;
+}
+
+table {
+ border-collapse: collapse;
+ border-radius: 5px;
+ overflow: hidden;
+ margin: 25px 0px;
+}
+
+th {
+ text-align: center;
+ font-weight: bolder;
+ font-size: large;
+ background-color: #e3e3e3;
+ border-right: none;
+ border-left: none;
+ padding: 15px 40px;
+}
diff --git a/ruby-directory-sync-example/views/index.erb b/ruby-directory-sync-example/views/index.erb
index f0c9d07..a22db28 100644
--- a/ruby-directory-sync-example/views/index.erb
+++ b/ruby-directory-sync-example/views/index.erb
@@ -1,29 +1,76 @@
+
+
>
+
+
-
-
>
-
-
-
-
-
-
-
" alt="workos logo">
+
+
+
+
+
Ruby Directory Sync Example App
+
+
+
+
+
+
+
+
Select a Directory
+
+
-
Ruby Directory Sync Example App
-
-
-
-
Test Webhooks
- <% if @directories.any? %>
-
-
Directories
- <% @directories.each do |directory|%>
-
<%= directory.name %>
-
- <% end %>
- <% end %>
+
+
+
+ <% if @after %>
+
+ <% end %>
+ <% if @before %>
+
+ <% end %>
+
+
-
+
+
\ No newline at end of file
diff --git a/ruby-magic-link-example/Gemfile b/ruby-magic-link-example/Gemfile
index dfcc602..149711a 100644
--- a/ruby-magic-link-example/Gemfile
+++ b/ruby-magic-link-example/Gemfile
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
gem 'dotenv', '2.7.6'
gem 'sinatra', '2.2.0'
-gem 'workos', '2.5.0'
+gem 'workos', '2.12.0'
diff --git a/ruby-magic-link-example/Gemfile.lock b/ruby-magic-link-example/Gemfile.lock
index 6208190..882d259 100644
--- a/ruby-magic-link-example/Gemfile.lock
+++ b/ruby-magic-link-example/Gemfile.lock
@@ -4,7 +4,7 @@ GEM
dotenv (2.7.6)
mustermann (1.1.2)
ruby2_keywords (~> 0.0.1)
- rack (2.2.4)
+ rack (2.2.6.4)
rack-protection (2.2.0)
rack
ruby2_keywords (0.0.5)
@@ -13,9 +13,9 @@ GEM
rack (~> 2.2)
rack-protection (= 2.2.0)
tilt (~> 2.0)
- sorbet-runtime (0.5.10274)
- tilt (2.0.11)
- workos (2.5.0)
+ sorbet-runtime (0.5.10741)
+ tilt (2.1.0)
+ workos (2.12.0)
sorbet-runtime (~> 0.5)
PLATFORMS
@@ -24,7 +24,7 @@ PLATFORMS
DEPENDENCIES
dotenv (= 2.7.6)
sinatra (= 2.2.0)
- workos (= 2.5.0)
+ workos (= 2.12.0)
BUNDLED WITH
2.1.4
diff --git a/ruby-mfa-example/Gemfile b/ruby-mfa-example/Gemfile
index 79504ae..ff2fcde 100644
--- a/ruby-mfa-example/Gemfile
+++ b/ruby-mfa-example/Gemfile
@@ -4,4 +4,4 @@ source 'https://rubygems.org'
gem 'dotenv', '2.7.6'
gem 'sinatra', '2.2.0'
-gem 'workos', '2.5.0'
+gem 'workos', '2.12.0'
diff --git a/ruby-mfa-example/Gemfile.lock b/ruby-mfa-example/Gemfile.lock
index 9250ace..882d259 100644
--- a/ruby-mfa-example/Gemfile.lock
+++ b/ruby-mfa-example/Gemfile.lock
@@ -4,7 +4,7 @@ GEM
dotenv (2.7.6)
mustermann (1.1.2)
ruby2_keywords (~> 0.0.1)
- rack (2.2.4)
+ rack (2.2.6.4)
rack-protection (2.2.0)
rack
ruby2_keywords (0.0.5)
@@ -13,9 +13,9 @@ GEM
rack (~> 2.2)
rack-protection (= 2.2.0)
tilt (~> 2.0)
- sorbet-runtime (0.5.10323)
- tilt (2.0.11)
- workos (2.5.0)
+ sorbet-runtime (0.5.10741)
+ tilt (2.1.0)
+ workos (2.12.0)
sorbet-runtime (~> 0.5)
PLATFORMS
@@ -24,7 +24,7 @@ PLATFORMS
DEPENDENCIES
dotenv (= 2.7.6)
sinatra (= 2.2.0)
- workos (= 2.5.0)
+ workos (= 2.12.0)
BUNDLED WITH
2.1.4
diff --git a/ruby-rails-sso-example/Gemfile b/ruby-rails-sso-example/Gemfile
index 821fc4b..81798f7 100644
--- a/ruby-rails-sso-example/Gemfile
+++ b/ruby-rails-sso-example/Gemfile
@@ -32,10 +32,9 @@ gem 'bootstrap', '~> 5.1.1'
# Use Devise for general authentication
gem 'devise'
# Use WorkOS to authenticate users via SSO
-gem 'workos', '2.5.0'
+gem 'workos', '2.12.0'
# Use JSON to generate user information in JSON format
gem "json", ">= 2.3.0"
-gem 'pry'
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false
diff --git a/ruby-rails-sso-example/Gemfile.lock b/ruby-rails-sso-example/Gemfile.lock
index b81ffb2..e3456cf 100644
--- a/ruby-rails-sso-example/Gemfile.lock
+++ b/ruby-rails-sso-example/Gemfile.lock
@@ -1,74 +1,74 @@
GEM
remote: https://rubygems.org/
specs:
- actioncable (7.0.4.2)
- actionpack (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actioncable (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
- actionmailbox (7.0.4.2)
- actionpack (= 7.0.4.2)
- activejob (= 7.0.4.2)
- activerecord (= 7.0.4.2)
- activestorage (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionmailbox (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ activejob (= 7.0.4.3)
+ activerecord (= 7.0.4.3)
+ activestorage (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
- actionmailer (7.0.4.2)
- actionpack (= 7.0.4.2)
- actionview (= 7.0.4.2)
- activejob (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionmailer (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ actionview (= 7.0.4.3)
+ activejob (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
- actionpack (7.0.4.2)
- actionview (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionpack (7.0.4.3)
+ actionview (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
- actiontext (7.0.4.2)
- actionpack (= 7.0.4.2)
- activerecord (= 7.0.4.2)
- activestorage (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ actiontext (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ activerecord (= 7.0.4.3)
+ activestorage (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
- actionview (7.0.4.2)
- activesupport (= 7.0.4.2)
+ actionview (7.0.4.3)
+ activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
- activejob (7.0.4.2)
- activesupport (= 7.0.4.2)
+ activejob (7.0.4.3)
+ activesupport (= 7.0.4.3)
globalid (>= 0.3.6)
- activemodel (7.0.4.2)
- activesupport (= 7.0.4.2)
- activerecord (7.0.4.2)
- activemodel (= 7.0.4.2)
- activesupport (= 7.0.4.2)
- activestorage (7.0.4.2)
- actionpack (= 7.0.4.2)
- activejob (= 7.0.4.2)
- activerecord (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ activemodel (7.0.4.3)
+ activesupport (= 7.0.4.3)
+ activerecord (7.0.4.3)
+ activemodel (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
+ activestorage (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ activejob (= 7.0.4.3)
+ activerecord (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
- activesupport (7.0.4.2)
+ activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
- autoprefixer-rails (10.4.7.0)
+ autoprefixer-rails (10.4.13.0)
execjs (~> 2)
bcrypt (3.1.18)
bindex (0.8.1)
@@ -89,11 +89,10 @@ GEM
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
- coderay (1.1.3)
- concurrent-ruby (1.2.0)
+ concurrent-ruby (1.2.2)
crass (1.0.6)
date (3.3.3)
- devise (4.8.1)
+ devise (4.9.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
@@ -127,8 +126,8 @@ GEM
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.8.1)
- minitest (5.17.0)
- msgpack (1.6.0)
+ minitest (5.18.0)
+ msgpack (1.7.0)
net-http (0.3.2)
uri
net-imap (0.3.4)
@@ -146,40 +145,37 @@ GEM
racc (~> 1.4)
orm_adapter (0.5.0)
popper_js (2.11.6)
- pry (0.14.2)
- coderay (~> 1.1)
- method_source (~> 1.0)
public_suffix (5.0.1)
puma (4.3.12)
nio4r (~> 2.0)
racc (1.6.2)
- rack (2.2.6.2)
+ rack (2.2.6.4)
rack-proxy (0.7.6)
rack
- rack-test (2.0.2)
+ rack-test (2.1.0)
rack (>= 1.3)
- rails (7.0.4.2)
- actioncable (= 7.0.4.2)
- actionmailbox (= 7.0.4.2)
- actionmailer (= 7.0.4.2)
- actionpack (= 7.0.4.2)
- actiontext (= 7.0.4.2)
- actionview (= 7.0.4.2)
- activejob (= 7.0.4.2)
- activemodel (= 7.0.4.2)
- activerecord (= 7.0.4.2)
- activestorage (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ rails (7.0.4.3)
+ actioncable (= 7.0.4.3)
+ actionmailbox (= 7.0.4.3)
+ actionmailer (= 7.0.4.3)
+ actionpack (= 7.0.4.3)
+ actiontext (= 7.0.4.3)
+ actionview (= 7.0.4.3)
+ activejob (= 7.0.4.3)
+ activemodel (= 7.0.4.3)
+ activerecord (= 7.0.4.3)
+ activestorage (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
bundler (>= 1.15.0)
- railties (= 7.0.4.2)
+ railties (= 7.0.4.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
- railties (7.0.4.2)
- actionpack (= 7.0.4.2)
- activesupport (= 7.0.4.2)
+ railties (7.0.4.3)
+ actionpack (= 7.0.4.3)
+ activesupport (= 7.0.4.3)
method_source
rake (>= 12.2)
thor (~> 1.0)
@@ -204,11 +200,11 @@ GEM
sprockets (> 3.0)
sprockets-rails
tilt
- selenium-webdriver (4.8.0)
+ selenium-webdriver (4.8.6)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
- sorbet-runtime (0.5.10667)
+ sorbet-runtime (0.5.10741)
spring (2.1.1)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
@@ -220,17 +216,17 @@ GEM
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
- sqlite3 (1.6.0)
+ sqlite3 (1.6.2)
mini_portile2 (~> 2.8.0)
thor (1.2.1)
- tilt (2.0.11)
+ tilt (2.1.0)
timeout (0.3.2)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- uri (0.12.0)
+ uri (0.12.1)
warden (1.2.9)
rack (>= 2.0.9)
web-console (4.2.0)
@@ -250,7 +246,7 @@ GEM
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
- workos (2.5.0)
+ workos (2.12.0)
sorbet-runtime (~> 0.5)
xpath (3.2.0)
nokogiri (~> 1.8)
@@ -271,7 +267,6 @@ DEPENDENCIES
json (>= 2.3.0)
listen (~> 3.2)
net-http
- pry
puma (~> 4.3)
rails (~> 7.0.1)
sass-rails (>= 6)
@@ -285,7 +280,7 @@ DEPENDENCIES
web-console (>= 3.3.0)
webdrivers
webpacker (~> 4.0)
- workos (= 2.5.0)
+ workos (= 2.12.0)
RUBY VERSION
ruby 2.7.2p137
diff --git a/ruby-sso-example/Gemfile b/ruby-sso-example/Gemfile
index dfcc602..149711a 100644
--- a/ruby-sso-example/Gemfile
+++ b/ruby-sso-example/Gemfile
@@ -4,5 +4,5 @@ source 'https://rubygems.org'
gem 'dotenv', '2.7.6'
gem 'sinatra', '2.2.0'
-gem 'workos', '2.5.0'
+gem 'workos', '2.12.0'
diff --git a/ruby-sso-example/Gemfile.lock b/ruby-sso-example/Gemfile.lock
index dac717b..882d259 100644
--- a/ruby-sso-example/Gemfile.lock
+++ b/ruby-sso-example/Gemfile.lock
@@ -4,7 +4,7 @@ GEM
dotenv (2.7.6)
mustermann (1.1.2)
ruby2_keywords (~> 0.0.1)
- rack (2.2.4)
+ rack (2.2.6.4)
rack-protection (2.2.0)
rack
ruby2_keywords (0.0.5)
@@ -13,9 +13,9 @@ GEM
rack (~> 2.2)
rack-protection (= 2.2.0)
tilt (~> 2.0)
- sorbet-runtime (0.5.10262)
- tilt (2.0.11)
- workos (2.5.0)
+ sorbet-runtime (0.5.10741)
+ tilt (2.1.0)
+ workos (2.12.0)
sorbet-runtime (~> 0.5)
PLATFORMS
@@ -24,7 +24,7 @@ PLATFORMS
DEPENDENCIES
dotenv (= 2.7.6)
sinatra (= 2.2.0)
- workos (= 2.5.0)
+ workos (= 2.12.0)
BUNDLED WITH
2.1.4
diff --git a/ruby-sso-example/app.rb b/ruby-sso-example/app.rb
index 3fcc2c6..ed650b1 100644
--- a/ruby-sso-example/app.rb
+++ b/ruby-sso-example/app.rb
@@ -36,7 +36,6 @@
# in place of the connection parameter
# https://workos.com/docs/reference/sso/authorize/get
get '/auth' do
- puts CONNECTION_ID
authorization_url = WorkOS::SSO.authorization_url(
client_id: CLIENT_ID,
connection: CONNECTION_ID,
diff --git a/ruby-sso-example/public/styles.css b/ruby-sso-example/public/styles.css
index e6f0e22..b25e26f 100644
--- a/ruby-sso-example/public/styles.css
+++ b/ruby-sso-example/public/styles.css
@@ -1,7 +1,6 @@
body {
font-family: Inter, sans-serif;
background-color: #f9f9fb;
-
}
.container_login {
@@ -152,11 +151,18 @@ h1 {
text-align: left;
margin-bottom: 0px;
font-weight: normal;
- letter-spacing: -.05em;
+ letter-spacing: -0.05em;
}
.home-hero-gradient {
- background-image: linear-gradient(45deg, #a163f1, #6363f1 22%, #3498ea 40%, #40dfa3 67%, rgba(64, 223, 163, 0));
+ background-image: linear-gradient(
+ 45deg,
+ #a163f1,
+ #6363f1 22%,
+ #3498ea 40%,
+ #40dfa3 67%,
+ rgba(64, 223, 163, 0)
+ );
background-size: 150% 100%;
background-repeat: no-repeat;
-webkit-background-clip: text;
@@ -168,7 +174,7 @@ h1 {
animation-delay: 0.4s;
text-align: left;
font-size: 75px;
- letter-spacing: -.05em;
+ letter-spacing: -0.05em;
font-weight: normal;
margin-top: 0px;
}
@@ -198,8 +204,14 @@ div.text_box {
overflow: scroll;
border-width: 3px;
border-style: solid;
- border-image:
- linear-gradient(#a163f1, #6363f1 22%, #3498ea 40%, #40dfa3 67%, rgba(64, 223, 163, 0)) 0 100%;
+ border-image: linear-gradient(
+ #a163f1,
+ #6363f1 22%,
+ #3498ea 40%,
+ #40dfa3 67%,
+ rgba(64, 223, 163, 0)
+ )
+ 0 100%;
}
.logged_in_nav {
@@ -220,12 +232,6 @@ div.text_box {
.logged_in_nav img {
height: 50px;
- border-radius: 50%;
- border: 2px solid #2f2e2e;
-}
-
-.logged_in_nav img:hover {
- border: 2px solid #555555;
}
.nav-item {
@@ -250,4 +256,4 @@ div.text_box {
pre.prettyprint {
border: none !important;
-}
\ No newline at end of file
+}
diff --git a/ruby-sso-example/views/index.erb b/ruby-sso-example/views/index.erb
index 748e5f1..08ce69c 100644
--- a/ruby-sso-example/views/index.erb
+++ b/ruby-sso-example/views/index.erb
@@ -1,13 +1,10 @@
<% if @current_user %>
-
-
+
" alt="workos logo">
-
-
-
You're logged in <%= @first_name %>, welcome!
+
@@ -25,10 +22,7 @@
Your app,
Enterprise Ready
-
-
Start selling to enterprise customers with just a few lines of code.
-
Implement features like single sign-on in minutes instead of months.
-
+