What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

```{ "data": { "type": "access-tokens", "attributes": { "username": "

U03SN9552JC
U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet
{
  "data": {
    "type": "access-tokens",
    "attributes": {
      "username": "<mailto:admin@spryker.com|admin@spryker.com>",
      "password": "change123"
    }
  }
}
Β«1

Comments

  • try with <mailto:sonia@spryker.com|sonia@spryker.com>

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Still failed unfortunately

  • what is the URL?

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    So through postman, I'm just doing

    {{ENDPOINT_URL}}/access-tokens
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    It seems to hit the endpoint

  • Unknown
    edited January 2023

    What is the {{ENDPOINT_URL}} ?

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet
    <http://glue.pricecoshop.local/>
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Its just something we changed from http://glue.de.spryker.local/ in the config

  • Unknown
    edited January 2023

    so you are not missing de ?? or the equivalent in your config

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    I'll try this on a fresh B2C real quick to see if thats the problem

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Mohammed, it seems I can authenticate Sonia on the B2C and not our own

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    Do u use docker/sdk? If yves, it can be possible that the oauth secret generated via docker/sdk matches not more with its one saved in db..

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    I can check via password_check agains the hash, I'll do that now

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yeah we use the docker/sdk

  • I think you missing with store subdomain within your configured URL
    as you will see in the B2C with sonia successfully authenticated the URL contained de

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet
                glue_eu:
                    application: glue
                    endpoints:
                        glue.pricecoshop.local:
                            store: DE
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    This is the deploy.dev.yml endpoint for this

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    it is the secret! i send u a workround to get this working again.. or just can just run docker/sdk up --build --data and the spy_oauth_client::secret is again saved with actual Env value generated from docker/sdk

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    I'll try the docker command real quick

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    ok

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    otherwise

    β€’ docker/sdk cli
    β€’ echo $SPRYKER_OAUTH_CLIENT_SECRET
    β€’ generate secret with password_hash bcrypt and save in spy_oauth_client -> secret

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    @UL65CH0MC winner winner!

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    I ran that command

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    And now I can auth

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    I see that I can only auth users with email addresses that are validated. Can I change a value somewhere, I'm using <mailto:example@example.com|example@example.com> so the email technically goes nowhere

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ LΓΆffelhardt Spryker Solution Partner Posts: 871 πŸ§‘πŸ»β€πŸš€ - Cadet

    good! the secret is only saved on init-db command performed one time on docker/sdk up...

    when u run another day just docker/sdk up the secret does not match more with its one in db...

    what do u mean with:
    Can I change a value somewhere, I'm using <mailto:example@example.com|example@example.com> so the email technically goes nowhere

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    in the docs it says

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    If you are authenticating as a newly created customer, make sure to verify your email address first. If an email address was not confirmed, the endpoint returns the 403 "Failed to authenticate user" error.

  • U03SN9552JC
    U03SN9552JC Posts: 78 πŸ§‘πŸ»β€πŸš€ - Cadet

    So I created a new customer using glue