Skip to content

Conversation

@blankdots
Copy link
Contributor

Description

When deploying with OIDC_ENABLED the index.html page seems to be missing

/app $ ls -al /usr/local/lib/python3.10/site-packages/swift_browser_ui/ui/static/
total 3124
drwxr-xr-x    3 root     root          4096 Mar 20 13:58 .
drwxr-xr-x    4 root     root          4096 Mar 20 13:58 ..
-rw-r--r--    1 root     root             0 Mar 20 13:58 .gitkeep
-rw-r--r--    1 root     root          1419 Mar 20 13:58 400.html
-rw-r--r--    1 root     root          1415 Mar 20 13:58 401.html
-rw-r--r--    1 root     root          1415 Mar 20 13:58 403.html
-rw-r--r--    1 root     root          1417 Mar 20 13:58 404.html
-rw-r--r--    1 root     root          1415 Mar 20 13:58 503.html
drwxr-xr-x    2 root     root          4096 Mar 20 13:58 assets
-rw-r--r--    1 root     root          1326 Mar 20 13:58 browse.html
-rw-r--r--    1 root     root          1330 Mar 20 13:58 index_oidc.html
-rw-r--r--    1 root     root        212948 Mar 20 13:56 libupload.js
-rwxr-xr-x    1 root     root       2926364 Mar 20 13:56 libupload.wasm
-rw-r--r--    1 root     root           993 Mar 20 13:58 login.html
-rw-r--r--    1 root     root          1419 Mar 20 13:58 login2step.html
-rw-r--r--    1 root     root          1251 Mar 20 13:58 loginpassword.html
-rw-r--r--    1 root     root           995 Mar 20 13:58 select.html

This is an attempt to fix thisby using https://vitejs.dev/guide/api-plugin.html#transformindexhtml

Related issues

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Changes Made

  • if oidc is enabled replace the index.js with index_oidc.js
  • removed the index_oidc.html page as I don't think it is required with this replacement

Testing

  • Needs testing (start an issue or do a follow up PR about it)

Mentions

I am open to any other fixes

@blankdots blankdots self-assigned this Mar 21, 2023
@csc-felipe
Copy link
Contributor

This looks good. I just don't see the check for if oidc is enabled.

@csc-felipe
Copy link
Contributor

csc-felipe commented Mar 21, 2023

login2step.html file points to index.js as well. Doesn't it get replaced? You might need to check that it replaces only on index.html

@csc-felipe
Copy link
Contributor

csc-felipe commented Mar 21, 2023

So when OIDC is enabled, a new step is added before the existing step. So the existing step becomes the second, and the OIDC becomes the first. And we have this trick to make it happen. The backend forwards to correct files.

@blankdots
Copy link
Contributor Author

login2step.html file points to index.js as well. Doesn't it get replaced? You might need to check that it replaces only on index.html

not sure how to check that, any pointers ?

@blankdots blankdots force-pushed the bugfix/correct-index-oidc branch from aee98d5 to 1bcc116 Compare March 21, 2023 10:21
@blankdots
Copy link
Contributor Author

This looks good. I just don't see the check for if oidc is enabled.

done

@blankdots
Copy link
Contributor Author

So when OIDC is enabled, a new step is added before the existing step. So the existing step becomes the second, and the OIDC becomes the first. And we have this trick to make it happen. The backend forwards to correct files.

ok, not sure what to do with that information, do you have any other fix that can be applied all is fine from my side

@blankdots blankdots force-pushed the bugfix/correct-index-oidc branch from 1bcc116 to 800df03 Compare March 21, 2023 10:23
@csc-felipe
Copy link
Contributor

ok, not sure what to do with that information, do you have any other fix that can be applied all is fine from my side

No, it was partly talking to myself

@blankdots blankdots force-pushed the bugfix/correct-index-oidc branch from 800df03 to dfb0986 Compare March 21, 2023 10:34
@csc-felipe
Copy link
Contributor

login2step.html file points to index.js as well. Doesn't it get replaced? You might need to check that it replaces only on index.html

But for this one something needs to be done, so it replaces only on index.html. Because now login2step.html gets replaced as well

@blankdots blankdots marked this pull request as draft March 21, 2023 11:09
@blankdots blankdots force-pushed the bugfix/correct-index-oidc branch from 70f96cb to 70ff0b8 Compare March 21, 2023 11:14
@blankdots blankdots marked this pull request as ready for review March 21, 2023 11:19
@csc-felipe csc-felipe merged commit 3d690a3 into feature/vue3 Mar 21, 2023
@csc-felipe csc-felipe deleted the bugfix/correct-index-oidc branch March 21, 2023 11:25
blankdots pushed a commit that referenced this pull request Jun 19, 2023
Add segment container to copied containers

Closes #1036 and #1038

See merge request sds-dev/sd-connect/swift-browser-ui!62
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants