# Meeco authentication

At the end of this doc, this is what suppose to see in the Guardian app.

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-8c60b6c947fc0f704633026aecee46e94af14ec2%2FScreenshot%202023-08-02%20at%2020.23.36.png?alt=media" alt=""><figcaption></figcaption></figure>

### Meeco credentials

Be sure to configure your Meeco credentials in `configs/.env.develop.guardian.system`

```
MEECO_AUTH_PROVIDER_ACTIVE=1
MEECO_BASE_URL=https://api-sandbox.svx.exchange
MEECO_OAUTH_URL="https://login-sandbox.securevalueexchange.com/oauth2/token"
MEECO_OAUTH_CLIENT_ID=571*********************e6a
MEECO_OAUTH_SECRET_ID=ONO@*****************rnNxpNt
MEECO_OAUTH_SCOPE=openid
MEECO_OAUTH_GRANT_TYPE=client_credentials
MEECO_ORGANIZATION_ID="09f7115e***********be032d6ca149"
MEECO_PASSPHRASE=7MHHMTJQQ******************7TPBH2P71XKDH1ZPF
MEECO_ISSUER_ORGANIZATION_ID="did:web:did-web.securevalue.exchange:343b08f3-***********-3f2d8a146a0d"
MEECO_ISSUER_ORGANIZATION_NAME=
MEECO_PRESENTATION_DEFINITION_ID="832e996c-**********-9d170fa381a8"
```

You might find the values in the portal <https://portal.securevalueexchange.com/>

### Where to find these credentials?

The very first thing is to activate the use of Meeco provider

```
MEECO_AUTH_PROVIDER_ACTIVE=1
```

For the `MEECO_OAUTH_CLIENT_ID` and MEECO\_OAUTH\_SECRET\_ID check the page below:

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-c25ea662b5466ccab41983c41fa4cec583005814%2FScreenshot%202023-08-02%20at%2020.44.38.png?alt=media&#x26;token=4510e8c1-56a6-49ad-b20e-113d258af5d8" alt=""><figcaption></figcaption></figure>

For the variables: `MEECO_OAUTH_SCOPE=openid` and `MEECO_OAUTH_GRANT_TYPE=client_credentials` keep it as it is.

The MEECO\_ORGANIZATION\_ID variable value can be found here

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-f9ca9a6067501297e977691c6b0c11bef7a095d2%2FScreenshot%202023-08-02%20at%2020.49.20.png?alt=media" alt=""><figcaption><p>Account settings</p></figcaption></figure>

The `MEECO_ISSUER_ORGANIZATION_ID` and `MEECO_ISSUER_ORGANIZATION_NAME` value are found on the page below

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-6aeea49669f0f7167ba8c83bc0d6cd374e9c9eeb%2FScreenshot%202023-08-02%20at%2020.53.58.png?alt=media&#x26;token=329fa0ee-9f7f-4a6e-abac-9085195b6ece" alt=""><figcaption></figcaption></figure>

Finally, the `MEECO_PRESENTATION_DEFINITION_ID` value is found here

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-1b3af8491feb3c111681f00830c950d79394fbb3%2FScreenshot%202023-08-02%20at%2020.59.02.png?alt=media" alt=""><figcaption></figcaption></figure>

Once the env variables are defined you have to turn it on on the frontend. Set true the attribute **`isMeecoConfigured`** on the folder`frontend/src/environments/environment.ts`

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-5d3788afec138424059fd403008d7eeac77303c7%2FScreenshot%202023-08-02%20at%2019.43.11.png?alt=media" alt=""><figcaption></figcaption></figure>

Note that there are at least three different environment files: `environment.prod.ts`, `environment.demo.ts` (e.g) change them according to your configurations.

Be sure to run the `docker-compose up --build` (e.g) command again to have it done.\\

So, enjoy your new authentication mechanism.
