Skip to content

Commit

Permalink
Merge pull request #1473 from AletheiaFact/Update-the-Readme
Browse files Browse the repository at this point in the history
Update the Readme
  • Loading branch information
thesocialdev authored Nov 29, 2024
2 parents d9e0361 + a35356b commit 6f832d8
Showing 1 changed file with 10 additions and 55 deletions.
65 changes: 10 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ cp config/localConfig.example.ts config/localConfig.ts
``` sh
yarn seed
```
- Run the command below to update the users' affiliations:
``` sh
./node_modules/.bin/ts-node ./server/scripts/updateAllUsersAppAffiliation.ts
```
## Build to production

- The build step should be run as follow:
Expand Down Expand Up @@ -88,67 +92,18 @@ Check if users were created successfully by accessing the identities page:
### Ory Cloud
#### Taking What You Need:
- Create an account and a project on https://console.ory.sh/login.
- Copy the SDK Configuration url and save it.
- Scroll down in the same page and create a Personal Access Tokens, copy the acess token that gonna show up on the bottom of your screen and save it.
- Go to Identity Schema and click on Customize Identity Schema then change the actual schema to the code below and click Update after the change:
```
{
"$id": "https://schemas.ory.sh/presets/kratos/identity.email.schema.json",
"title": "Person",
"type": "object",
"properties": {
"traits": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"title": "E-Mail",
"ory.sh/kratos": {
"credentials": {
"password": {
"identifier": true
},
"webauthn": {
"identifier": true
},
"totp": {
"account_name": true
}
},
"recovery": {
"via": "email"
},
"verification": {
"via": "email"
}
},
"maxLength": 320
},
"user_id": {
"type": "string"
},
"role": {
"type": "object"
}
},
"required": [
"email",
"user_id"
],
"additionalProperties": false
}
}
}
```
- In Project settings, copy the SDK configuration URL and save it.
- On the same page, in API keys, create a new API key, copy it, and save it.
- Go to User Management in Identity Schema and click on Duplicate Identity Schema. Then, update the current schema to [IdentitySchema.JSON](https://github.com/AletheiaFact/aletheia/blob/stage/ory_config/identity.schema.json) and click Save after making the changes:
- Go to SDK Configuration url that you saved and add /schemas in the end of the url then copy the first id on the page and save it.
- If you want to check if it is the right id, at the same url paste after /schemas the /<schema_id> contaning the id that you just copied.

#### Making The Changes On Your Code:
- First you gonna have to change the ``authentication_type: `` to ory on your config.yaml and config.seed.yaml.
- Now take SDK Configuration url and paste on ``url: `` in both pages config.yaml, config.seed.yaml and on ``ORY_SDK_URL=`` in your .env too.
- Now Paste the acess token that you saved on ``access_token: `` in your config.yaml and config.seed.yaml.
- Do the same as above but now with the id that you saved and paste it on ``schema_id: ``.
- Now Paste the acess token that you saved on ``access_token: `` in your config.yaml and config.seed.yaml and on
``ORY_ACCESS_TOKEN=`` in your .env too.
- Do the same as above, but now with the Schema ID you saved, and paste it into ``schema_id`` and on ``ALETHEIA_SCHEMA_ID=`` in .env.

#### Setting up your own UI to make the right redirects:
- Go to User Interface on Ory Console and rewrite these fields: Login UI with http://localhost:3000/login and Settings UI with http://localhost:3000/profile.
Expand Down

0 comments on commit 6f832d8

Please sign in to comment.