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": "

Options
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
    Options

    Still failed unfortunately

  • what is the URL?

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    So through postman, I'm just doing

    {{ENDPOINT_URL}}/access-tokens
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    It seems to hit the endpoint

  • Unknown
    edited January 2023
    Options

    What is the {{ENDPOINT_URL}} ?

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options
    <http://glue.pricecoshop.local/>
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

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

  • Unknown
    edited January 2023
    Options

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

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

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

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    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
    Options

    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
    Options

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

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    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
    Options
                glue_eu:
                    application: glue
                    endpoints:
                        glue.pricecoshop.local:
                            store: DE
    
  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    This is the deploy.dev.yml endpoint for this

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    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
    Options

    I'll try the docker command real quick

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    ok

  • giovanni.piemontese
    giovanni.piemontese Technical Lead @ Löffelhardt Spryker Solution Partner Posts: 871 🧑🏻‍🚀 - Cadet
    Options

    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
    Options

    @UL65CH0MC winner winner!

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    I ran that command

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    And now I can auth

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    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
    Options

    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
    Options

    in the docs it says

  • U03SN9552JC
    U03SN9552JC Posts: 78 🧑🏻‍🚀 - Cadet
    Options

    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
    Options

    So I created a new customer using glue