Using in an iframe
If your website can be embedded in an iframe which is consumed by other websites, then this section is for you.
If the sites in which your iframe can be embedded share the same top level domain as the iframe domain, then you can ignore this section.
Session.initon the frontend.
- You will need to use
httpsduring testing / dev for this to work. You can use tools like ngrok to create a dev env with https on your website / API domain.
Make the changes below only if your CORS setting allows any origin to query your API. Ignore these backend changes if your iframe is only allowed to work within certain trusted sites (and you have whitelisted them via the allowed origins config in your CORS setting).
A note on Safari and Chrome (Incognito mode only)
The default behaviour for these is that third party cookies / localstorage are blocked. This means that sessions will not work, and we should instead show the user instructions on how to enable them (depending on their browser).
Once enabled, sessions will work as expected.
This is an open issue.