FlowCrypt / flowcrypt-browser

FlowCrypt Browser extension for Chrome and Firefox
https://flowcrypt.com
Other
372 stars 46 forks source link

ConfiguredIdpOAuth should produce an oauth window + save JWT to storage #5444

Closed tomholub closed 2 months ago

tomholub commented 1 year ago

part of #5311

ioanmo226 commented 1 year ago

@sosnovsky , @tomholub For which domain, Custom IDP is configured?

ioanmo226 commented 1 year ago

I was gonna work this one but i don't know which domain was configured to use custom IDP.

sosnovsky commented 1 year ago

We currently don't have configured custom IdP, here we just need code skeleton to support this functionality in the future.

Mart started working on implementing custom IdP support (subtasks of https://github.com/FlowCrypt/flowcrypt-browser/issues/5311) and now we need to finalize remaining parts.

For testing you can configure some IdP (like https://www.okta.com) and then check that authentication process will show 2 popups - first for Gmail permissions and second one for IdP authentication (in case when user has custom AuthenticationConfiguration )

tomholub commented 1 year ago

Ioan, We could configure an app on Auth0 or Okta and then you could include the configuration details from the IdP in the mock api - it will get returned from the mock FES.

Then you can start the extension that uses the mock - not as a test, but for regular use. Just start the mock separately, then find the extension that was built for mock and load that into the browser.

That will let you test thoroughly.

Then for writing a test, you can configure the mock fes to send configuration that is pointing to mock idp, which we already have. Just with some slightly different parameter in the url, which will make the mock idp render slightly different ui, which you will start checking for during the test. (every time the tests go through idp ui, you'll either check that it's the mock of "normal" idp, or "custom" idp, based on what you were expecting to see)