feat(frontend/auth): Added way to automatically fetch providers
This allows the frontend to list all available providers without hardcoding them in.
This commit is contained in:
parent
9ce9fa44e4
commit
6d630fee92
22 changed files with 1448 additions and 221 deletions
|
|
@ -1,186 +1 @@
|
|||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"providers": {
|
||||
"type": "object",
|
||||
"patternProperties": {
|
||||
"^(.*)$": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"auth_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"info_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"client_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"client_secret": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"env": {
|
||||
"description": "Secret is stored in the env var",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"env"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"inline": {
|
||||
"description": "Secret is inline here",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"inline"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"scopes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"redirect_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"default": {
|
||||
"unique_id": "email",
|
||||
"name": "name"
|
||||
},
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"unique_id": {
|
||||
"description": "A unique identifier for this provider",
|
||||
"default": "email",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "A name for this provider",
|
||||
"default": "name",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"unique_id",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"token_url",
|
||||
"auth_url",
|
||||
"info_url",
|
||||
"client_id",
|
||||
"client_secret",
|
||||
"scopes",
|
||||
"redirect_url",
|
||||
"user"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"openid_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"client_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"client_secret": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"env": {
|
||||
"description": "Secret is stored in the env var",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"env"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"inline": {
|
||||
"description": "Secret is inline here",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"inline"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"scopes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"redirect_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"user": {
|
||||
"default": {
|
||||
"unique_id": "email",
|
||||
"name": "name"
|
||||
},
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"unique_id": {
|
||||
"description": "A unique identifier for this provider",
|
||||
"default": "email",
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"description": "A name for this provider",
|
||||
"default": "name",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"unique_id",
|
||||
"name"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"openid_url",
|
||||
"client_id",
|
||||
"client_secret",
|
||||
"scopes",
|
||||
"redirect_url",
|
||||
"user"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"providers"
|
||||
]
|
||||
}
|
||||
{"type":"object","required":["providers"],"properties":{"providers":{"type":"object","patternProperties":{"^.*$":{"anyOf":[{"type":"object","required":["token_url","auth_url","info_url","client_id","client_secret","scopes","redirect_url","user","display_name"],"properties":{"token_url":{"type":"string"},"auth_url":{"type":"string"},"info_url":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"anyOf":[{"type":"object","required":["env"],"properties":{"env":{"type":"string","description":"Secret is stored in the env var"}}},{"type":"object","required":["inline"],"properties":{"inline":{"type":"string","description":"Secret is inline here"}}}]},"scopes":{"type":"array","items":{"type":"string"}},"redirect_url":{"type":"string"},"user":{"type":"object","required":["unique_id","name"],"properties":{"unique_id":{"type":"string","description":"A unique identifier for this provider","default":"email"},"name":{"type":"string","description":"A name for this provider","default":"name"}},"default":{"unique_id":"email","name":"name"}},"display_name":{"type":"string"},"color":{"type":"object","properties":{"default":{"type":"string"},"hover":{"type":"string"}}}}},{"type":"object","required":["openid_url","client_id","client_secret","scopes","redirect_url","user","display_name"],"properties":{"openid_url":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"anyOf":[{"type":"object","required":["env"],"properties":{"env":{"type":"string","description":"Secret is stored in the env var"}}},{"type":"object","required":["inline"],"properties":{"inline":{"type":"string","description":"Secret is inline here"}}}]},"scopes":{"type":"array","items":{"type":"string"}},"redirect_url":{"type":"string"},"user":{"type":"object","required":["unique_id","name"],"properties":{"unique_id":{"type":"string","description":"A unique identifier for this provider","default":"email"},"name":{"type":"string","description":"A name for this provider","default":"name"}},"default":{"unique_id":"email","name":"name"}},"display_name":{"type":"string"},"color":{"type":"object","properties":{"default":{"type":"string"},"hover":{"type":"string"}}}}}]}}},"$schema":{"type":"string"}}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue