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

Hello, i have a question for a general workflow in spryker. We want to create a user login workflow

UPWG9AYH2
UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

Hello,
i have a question for a general workflow in spryker. We want to create a user login workflow where some identity server is involved. So for the login of a customer (via /login endpoint in glue for example) there is an external id server which gets called from spryker and give back an user object and a token. But only if the user is allowed to login to this shop. Otherwise it should fail. When the user is granted, in the same call it takes this user object and looks in the spryker db if the user is already in spryker or not.
If not -> create, if yes -> consider an update of the user data if user data changed.

Yes, the creation/check of the user on the spryker side might be expensive but necessary in this case.
The glue response would then only contain the token after this successful login process.

So far so good.

The problem what i see here is, that spryker has this async mechanism of publish and synchronization. Means there is a lag when creating the customer in ZED and when they is available via the glue API (which uses AFAIK only Redis data).
My concerns here is, that this customer data isn’t fast enough available since the customer will start his shopping experience immediately right after the login. But the P&S process may take up to one minute i guess. Plus the login can’t promise if the data is ever available on glue (when P&S fails for example)
So my question: Is there any mechanism in spryker to have that customer data immediately in redis without going the async way? Does somebody had a similar case? Any other ideas or thoughts?
Thanks a lot!

Comments

  • Unknown
    edited February 2020

    Hey Ingo! Glue uses zed call to retrive customer information from DB not from Redis

  • UPWG9AYH2
    UPWG9AYH2 Posts: 509 🧑🏻‍🚀 - Cadet

    Hey Aleksey. If this is the case, my problem seems solved. 😉 I will evaluate that. Thanks a lot!