anvilresearch / connect-js

Anvil Connect JavaScript client for web browsers
http://anvil.io
MIT License
15 stars 11 forks source link

Mode to have page display in own window #6

Open henrjk opened 9 years ago

henrjk commented 9 years ago

The openid specs has an optional display request parameter with values page, popup, touch and wap.

It appears that independent(!?) from this there is also a choice on how to integrate this into the browser client app. Currently this library supports this by the configuration property display which has values popup or page (default). This is described in Readme.md

Note that page is implemented as a full page navigation (`window.location = ) which means that the app will be reloaded. This can be problematic for Single Page Apps.

A client should be able to display a full login page in a tab or window without having to do a reload.
This would behave similar to a popup on mobile devices. Mobile Safari does not support popups and opens a new tab instead.

One way to this would be to have the display configuration be popup, open_window ,same_windowwheresame_windowwould be the currentpage` setting.

Would this make sense?