aha_builder_core 1.0.7 → 1.0.8
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/README.md +5 -2
- data/lib/aha/auth/version.rb +1 -1
- data/lib/generators/aha_builder_core/auth/auth_generator.rb +3 -1
- data/lib/generators/aha_builder_core/auth/templates/migration.rb.tt +1 -0
- data/lib/generators/aha_builder_core/auth/templates/sessions_controller.rb.tt +1 -0
- 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: 490bd06e81ec0d130ff09c9878fac8c31e76fba35063579ae919caf5a743d55a
|
|
4
|
+
data.tar.gz: c7217cf98151dd3b5a66a757c11cb0f1bfa40401c0a98bbeea1ce9d27a443dce
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3fe25c0112738e2e7165694bdabc250670d52e031831595f4060bb6de96aac866887be3de7fbb44fa934eb1433360d62ba2a536ca60edc13cecae2bd1f27cf12
|
|
7
|
+
data.tar.gz: ac4d3246bd7ad318ae24780a5b880ee1bb3ab36441fe49ade5133a0a82ab4d12eed0cae9742a43a7263ad62e7ec71aaca77b48befb90a21180452ac6620a5775
|
data/README.md
CHANGED
|
@@ -48,7 +48,8 @@ result = Aha::Auth.authenticate_with_code(code: params[:code])
|
|
|
48
48
|
# first_name: "Jane",
|
|
49
49
|
# last_name: "Doe",
|
|
50
50
|
# email: "jane.doe@example.com",
|
|
51
|
-
# email_verified: true
|
|
51
|
+
# email_verified: true,
|
|
52
|
+
# avatar_url: "https://example.com/avatar.jpg"
|
|
52
53
|
# }
|
|
53
54
|
# }
|
|
54
55
|
```
|
|
@@ -62,6 +63,7 @@ The `user` object returned contains the authenticated user's profile information
|
|
|
62
63
|
- `last_name`: User's last name. last_name is optional and may not be present.
|
|
63
64
|
- `email`: User's email address
|
|
64
65
|
- `email_verified`: Boolean indicating if the email has been verified
|
|
66
|
+
- `avatar_url`: URL to the user's avatar image (may be nil if not available from the identity provider)
|
|
65
67
|
|
|
66
68
|
#### Linking to Local User Records
|
|
67
69
|
|
|
@@ -79,7 +81,8 @@ local_user.update!(
|
|
|
79
81
|
email: result[:user][:email],
|
|
80
82
|
first_name: result[:user][:first_name],
|
|
81
83
|
last_name: result[:user][:last_name],
|
|
82
|
-
email_verified: result[:user][:email_verified]
|
|
84
|
+
email_verified: result[:user][:email_verified],
|
|
85
|
+
avatar_url: result[:user][:avatar_url]
|
|
83
86
|
)
|
|
84
87
|
|
|
85
88
|
# Store tokens in session or database
|
data/lib/aha/auth/version.rb
CHANGED
|
@@ -51,7 +51,7 @@ module AhaBuilderCore
|
|
|
51
51
|
<<-RUBY
|
|
52
52
|
inertia_share auth: -> {
|
|
53
53
|
{
|
|
54
|
-
user: current_user&.as_json(only: %i[id email first_name last_name])
|
|
54
|
+
user: current_user&.as_json(only: %i[id email first_name last_name avatar_url])
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
RUBY
|
|
@@ -82,6 +82,7 @@ module AhaBuilderCore
|
|
|
82
82
|
email: string
|
|
83
83
|
first_name: string | null
|
|
84
84
|
last_name: string | null
|
|
85
|
+
avatar_url: string | null
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
export interface SharedData {
|
|
@@ -111,6 +112,7 @@ module AhaBuilderCore
|
|
|
111
112
|
email:string
|
|
112
113
|
first_name:string
|
|
113
114
|
last_name:string
|
|
115
|
+
avatar_url:string
|
|
114
116
|
email_verified:boolean
|
|
115
117
|
]
|
|
116
118
|
end
|
|
@@ -5,6 +5,7 @@ class <%= migration_class_name %> < ActiveRecord::Migration[<%= ActiveRecord::Mi
|
|
|
5
5
|
t.string :email, null: false
|
|
6
6
|
t.string :first_name
|
|
7
7
|
t.string :last_name
|
|
8
|
+
t.string :avatar_url
|
|
8
9
|
t.boolean :email_verified, default: false, null: false
|
|
9
10
|
<% custom_attributes.each do |attribute| -%>
|
|
10
11
|
<% unless attribute.virtual? -%>
|
|
@@ -19,6 +19,7 @@ class SessionsController < ApplicationController
|
|
|
19
19
|
email: result[:user]["email"],
|
|
20
20
|
first_name: result[:user]["first_name"],
|
|
21
21
|
last_name: result[:user]["last_name"],
|
|
22
|
+
avatar_url: result[:user]["avatar_url"],
|
|
22
23
|
email_verified: result[:user]["email_verified"]
|
|
23
24
|
)
|
|
24
25
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: aha_builder_core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aha! Labs Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|