save form data in a strapi backend
we've a formular (jobwizard), which currently stores all data in LocalStorage. We would like to make the data persistent in strapi. Saving data is only possible for autheticated Users. Authenticated User means a User known by an SSO (keycloak).
The Formular data will be sent with a Bearer Token to Strapi. Strapi has to validate the Token against the SSO and will get a UserID. If the UserID does not exists in Strapi User should be added.
Form data should be stored and owned by the UserID.
You can run the form locally.
git clone https://gitlab.com/yawik/jobwizard.git
cd jobwizard
yarn
yarn dev
Currently the form POST the data in Wizard.vue line 211. You can set an URI using the envvar YAWIK_API_URL.
You can login on you localhost using:
User: jobwizard@trash-mail.com
Pass: demo
This will authenticate against a keycloak which is configured in .env. Keycloak will give you a bearer token which should be used to store the job in strapi.
There is a repo with an initial strapi setup in https://gitlab.com/yawik/backend
There is a repo with an initial strapi setup in https://gitlab.com/yawik/backend
A local strapi can be setup by:
git clone git@gitlab.com:yawik/backend.git
cd backend
yarn
yarn dev