Skip to content

Reusable redirection page

A simple redirection pages should be created and provided by coko client as part of the authorization process from external providers. What is needed:

  • A mutation responsible of passing url encoded arguments, passed by an external provider after a successful login action, to coko/server in order to be used further in the flow of authorization.
  • The main react component should be responsible of the extraction of the required info from the url (e.g. session_state, code), then use this info as arguments of the aforementioned mutation.
  • A loading state should be displayed while the above mutation takes place. Upon the outcome of the mutation either a success message should be displayed or any corresponding error messages. (as an example the email verification pages could be used here)
  • The url of this page which will be implemented should be something similar to https://example.com/provider/{provider_identifier}/callback?...., the purpose of this is to distinguish which provider should be called by the server side implementation in order to complete the authorization process. provider_identifier should also be used as argument of the above mutation.