Skip to content

Commit

Permalink
fix(console): webauthn config for docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
xmlking committed Jun 21, 2024
1 parent 49e07b5 commit 2987bc6
Show file tree
Hide file tree
Showing 9 changed files with 424 additions and 22 deletions.
305 changes: 305 additions & 0 deletions apps/console/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ input Boolean_comparison_exp {
_nin: [Boolean!]
}

"""
Boolean expression to compare columns of type "Int". All fields are combined with logical 'AND'.
"""
input Int_comparison_exp {
_eq: Int
_gt: Int
_gte: Int
_in: [Int!]
_is_null: Boolean
_lt: Int
_lte: Int
_neq: Int
_nin: [Int!]
}

input ListUniversitiesInput {
country: String
name: String
Expand Down Expand Up @@ -252,6 +267,140 @@ input action_stream_cursor_value_input {
value: String
}

"""
User webauthn security keys. Don't modify its structure as Hasura Auth relies on it to function properly.
"""
type authUserSecurityKeys {
id: uuid!
nickname: String

"""An object relationship"""
user: users!
}

"""
aggregated selection of "auth.user_security_keys"
"""
type authUserSecurityKeys_aggregate {
aggregate: authUserSecurityKeys_aggregate_fields
nodes: [authUserSecurityKeys!]!
}

input authUserSecurityKeys_aggregate_bool_exp {
count: authUserSecurityKeys_aggregate_bool_exp_count
}

input authUserSecurityKeys_aggregate_bool_exp_count {
arguments: [authUserSecurityKeys_select_column!]
distinct: Boolean
filter: authUserSecurityKeys_bool_exp
predicate: Int_comparison_exp!
}

"""
aggregate fields of "auth.user_security_keys"
"""
type authUserSecurityKeys_aggregate_fields {
count(columns: [authUserSecurityKeys_select_column!], distinct: Boolean): Int!
max: authUserSecurityKeys_max_fields
min: authUserSecurityKeys_min_fields
}

"""
order by aggregate values of table "auth.user_security_keys"
"""
input authUserSecurityKeys_aggregate_order_by {
count: order_by
max: authUserSecurityKeys_max_order_by
min: authUserSecurityKeys_min_order_by
}

"""
Boolean expression to filter rows from the table "auth.user_security_keys". All fields are combined with a logical 'AND'.
"""
input authUserSecurityKeys_bool_exp {
_and: [authUserSecurityKeys_bool_exp!]
_not: authUserSecurityKeys_bool_exp
_or: [authUserSecurityKeys_bool_exp!]
id: uuid_comparison_exp
nickname: String_comparison_exp
user: users_bool_exp
}

"""aggregate max on columns"""
type authUserSecurityKeys_max_fields {
id: uuid
nickname: String
}

"""
order by max() on columns of table "auth.user_security_keys"
"""
input authUserSecurityKeys_max_order_by {
id: order_by
nickname: order_by
}

"""aggregate min on columns"""
type authUserSecurityKeys_min_fields {
id: uuid
nickname: String
}

"""
order by min() on columns of table "auth.user_security_keys"
"""
input authUserSecurityKeys_min_order_by {
id: order_by
nickname: order_by
}

"""
response of any mutation on the table "auth.user_security_keys"
"""
type authUserSecurityKeys_mutation_response {
"""number of rows affected by the mutation"""
affected_rows: Int!

"""data from the rows affected by the mutation"""
returning: [authUserSecurityKeys!]!
}

"""Ordering options when selecting data from "auth.user_security_keys"."""
input authUserSecurityKeys_order_by {
id: order_by
nickname: order_by
user: users_order_by
}

"""
select columns of table "auth.user_security_keys"
"""
enum authUserSecurityKeys_select_column {
"""column name"""
id

"""column name"""
nickname
}

"""
Streaming cursor of the table "authUserSecurityKeys"
"""
input authUserSecurityKeys_stream_cursor_input {
"""Stream column input with initial value"""
initial_value: authUserSecurityKeys_stream_cursor_value_input!

"""cursor ordering"""
ordering: cursor_ordering
}

"""Initial value of the column from where the streaming should start"""
input authUserSecurityKeys_stream_cursor_value_input {
id: uuid
nickname: String
}

scalar citext

"""
Expand Down Expand Up @@ -1140,6 +1289,19 @@ input jsonb_comparison_exp {

"""mutation root"""
type mutation_root {
"""
delete single row from the table: "auth.user_security_keys"
"""
deleteAuthUserSecurityKey(id: uuid!): authUserSecurityKeys

"""
delete data from the table: "auth.user_security_keys"
"""
deleteAuthUserSecurityKeys(
"""filter the rows which have to be deleted"""
where: authUserSecurityKeys_bool_exp!
): authUserSecurityKeys_mutation_response

"""
delete data from the table: "device_pool"
"""
Expand Down Expand Up @@ -2334,6 +2496,51 @@ type query_root {
"""fetch data from the table: "action" using primary key columns"""
action_by_pk(value: String!): action

"""
fetch data from the table: "auth.user_security_keys" using primary key columns
"""
authUserSecurityKey(id: uuid!): authUserSecurityKeys

"""
fetch data from the table: "auth.user_security_keys"
"""
authUserSecurityKeys(
"""distinct select on columns"""
distinct_on: [authUserSecurityKeys_select_column!]

"""limit the number of rows returned"""
limit: Int

"""skip the first n rows. Use only with order_by"""
offset: Int

"""sort the rows by one or more columns"""
order_by: [authUserSecurityKeys_order_by!]

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): [authUserSecurityKeys!]!

"""
fetch aggregated fields from the table: "auth.user_security_keys"
"""
authUserSecurityKeysAggregate(
"""distinct select on columns"""
distinct_on: [authUserSecurityKeys_select_column!]

"""limit the number of rows returned"""
limit: Int

"""skip the first n rows. Use only with order_by"""
offset: Int

"""sort the rows by one or more columns"""
order_by: [authUserSecurityKeys_order_by!]

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): authUserSecurityKeys_aggregate!

"""
fetch data from the table: "device_pool"
"""
Expand Down Expand Up @@ -3206,6 +3413,65 @@ type subscription_root {
where: action_bool_exp
): [action!]!

"""
fetch data from the table: "auth.user_security_keys" using primary key columns
"""
authUserSecurityKey(id: uuid!): authUserSecurityKeys

"""
fetch data from the table: "auth.user_security_keys"
"""
authUserSecurityKeys(
"""distinct select on columns"""
distinct_on: [authUserSecurityKeys_select_column!]

"""limit the number of rows returned"""
limit: Int

"""skip the first n rows. Use only with order_by"""
offset: Int

"""sort the rows by one or more columns"""
order_by: [authUserSecurityKeys_order_by!]

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): [authUserSecurityKeys!]!

"""
fetch aggregated fields from the table: "auth.user_security_keys"
"""
authUserSecurityKeysAggregate(
"""distinct select on columns"""
distinct_on: [authUserSecurityKeys_select_column!]

"""limit the number of rows returned"""
limit: Int

"""skip the first n rows. Use only with order_by"""
offset: Int

"""sort the rows by one or more columns"""
order_by: [authUserSecurityKeys_order_by!]

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): authUserSecurityKeys_aggregate!

"""
fetch data from the table in a streaming manner: "auth.user_security_keys"
"""
authUserSecurityKeys_stream(
"""maximum number of rows returned in a single batch"""
batch_size: Int!

"""cursor to stream the results returned by the query"""
cursor: [authUserSecurityKeys_stream_cursor_input]!

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): [authUserSecurityKeys!]!

"""
fetch data from the table: "device_pool"
"""
Expand Down Expand Up @@ -4158,6 +4424,42 @@ type users {
otpMethodLastUsed: String
phoneNumber: String
phoneNumberVerified: Boolean!

"""An array relationship"""
securityKeys(
"""distinct select on columns"""
distinct_on: [authUserSecurityKeys_select_column!]

"""limit the number of rows returned"""
limit: Int

"""skip the first n rows. Use only with order_by"""
offset: Int

"""sort the rows by one or more columns"""
order_by: [authUserSecurityKeys_order_by!]

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): [authUserSecurityKeys!]!

"""An aggregate relationship"""
securityKeys_aggregate(
"""distinct select on columns"""
distinct_on: [authUserSecurityKeys_select_column!]

"""limit the number of rows returned"""
limit: Int

"""skip the first n rows. Use only with order_by"""
offset: Int

"""sort the rows by one or more columns"""
order_by: [authUserSecurityKeys_order_by!]

"""filter the rows returned"""
where: authUserSecurityKeys_bool_exp
): authUserSecurityKeys_aggregate!
ticket: String
ticketExpiresAt: timestamptz!
updatedAt: timestamptz!
Expand Down Expand Up @@ -4190,6 +4492,8 @@ input users_bool_exp {
otpMethodLastUsed: String_comparison_exp
phoneNumber: String_comparison_exp
phoneNumberVerified: Boolean_comparison_exp
securityKeys: authUserSecurityKeys_bool_exp
securityKeys_aggregate: authUserSecurityKeys_aggregate_bool_exp
ticket: String_comparison_exp
ticketExpiresAt: timestamptz_comparison_exp
updatedAt: timestamptz_comparison_exp
Expand Down Expand Up @@ -4228,6 +4532,7 @@ input users_order_by {
otpMethodLastUsed: order_by
phoneNumber: order_by
phoneNumberVerified: order_by
securityKeys_aggregate: authUserSecurityKeys_aggregate_order_by
ticket: order_by
ticketExpiresAt: order_by
updatedAt: order_by
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Magic Spell

This **wordsmith** svelte component enables user write *with confidence* in any web forms.

Based on nextjs [magic-spell](https://github.com/ai-ng/magic-spell/tree/main)

## Ref
Expand Down
5 changes: 5 additions & 0 deletions apps/console/src/lib/graphql/MUTATION.DeleteSecurityKey.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mutation RemoveSecurityKey($id: uuid!) {
deleteAuthUserSecurityKey(id: $id) {
id
}
}
6 changes: 6 additions & 0 deletions apps/console/src/lib/graphql/QUERY.ListSecurityKeys.gql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
query ListSecurityKeys($userId: uuid!) {
authUserSecurityKeys(where: { userId: { _eq: $userId } }) {
id
nickname
}
}
Loading

0 comments on commit 2987bc6

Please sign in to comment.