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

More realistic example into the readme #48

Open
allantatter opened this issue Nov 24, 2023 · 0 comments
Open

More realistic example into the readme #48

allantatter opened this issue Nov 24, 2023 · 0 comments

Comments

@allantatter
Copy link

The current example how to implement "Authenticating with semantics identifier" (https://github.com/SK-EID/smart-id-php-client#authenticating-with-semantics-identifier) merges 2 steps into a single flow which is a bit misleading when considering a real-world use case that IMHO is split into following steps:

  1. First request is made to the backend to initialize the Smart-ID authentication process and get the verification code to show to the user.
  2. Right after the verification code response has come back and shown to the user, a second request is made to the backend that responds when the user has gone through the process within Smart-ID app or some exception has been thrown. Then the user is either authenticated or an error will we sent as a response to the client.

It is not so straight-forward to split the example into 2 steps as objects are passed along, not simple data like strings (like authenticationHash, which would happen in a realistic use case when data is moving between the backend and the client between those steps).

I do understand that readme should show a simple use-case however it would make sense in my mind to make it more that can be used in a real application.

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