Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Support Agent Login 👔 #1849

Open
johnboxall opened this issue Jun 20, 2024 · 0 comments
Open

[FEATURE] Support Agent Login 👔 #1849

johnboxall opened this issue Jun 20, 2024 · 0 comments

Comments

@johnboxall
Copy link
Collaborator

PWA Kit could support an "Agent Login" mode that interact with SLAS Trusted Agent on Behalf Of. This mode would allow customer agents to shop the store on behalf of a customer, helping them complete their checkout.

Trusted Agent logins do not have a refresh token, so custom logic is required around authorization.

<CommerceApiProvider> accepts a fetchedToken prop which bypasses the regular authentication flow.

If you want to make this work today, you'd like need to alter the <AppConfig> component a conditionals to detect the agent login flow.

I'm not entirely sure how you'd handle the expiry of the token. You might need some custom logic that would detect that the token is expired and reload the app through the agent flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant