-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
index.js:76 [okta-auth-sdk] WARN: a saved auth transaction exists in storage. This may indicate another auth flow is already in progress. #1515
Comments
Since you're unable to provide repro steps from your commercial app, please create a minimal example in a separate repo (this sample can be used as a starting point) and ideally a live demo |
Here is my main.js file.
Here is my App.vue file
Here is my index.js file (router file)
Version I am using is :
Node: v20.11.1 When I am using in local by npm run dev it is working fine. But When I build it then the above error mentioned in screenshot is getting. According to my investigation, Rollup used by Vite for build is not able to import Okta-Auth-js in main.js. During local run vite is using ESBuild to start the serve. |
@PavankalyanPayyavula I used this sample app, upgrade it to use [email protected] and was able to build no problems jared:okta-hosted-login$ yarn vite build
yarn run v1.22.19
$ /Users/jaredperreault/Code/devex/samples/vue/okta-hosted-login/node_modules/.bin/vite build
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.
vite v5.3.3 building for production...
✓ 309 modules transformed.
dist/index.html 0.44 kB │ gzip: 0.30 kB
dist/assets/logo-CPmPqqKk.png 6.85 kB
dist/assets/outline-icons-BxYFLS9j.woff2 13.58 kB
dist/assets/outline-icons-Cea8WKql.woff 16.80 kB
dist/assets/flags-DOLqOU7Y.png 28.12 kB
dist/assets/outline-icons-CcXn14M0.ttf 34.09 kB
dist/assets/outline-icons-C8GVsgD2.eot 34.39 kB
dist/assets/brand-icons-B9NtTMAN.woff2 76.61 kB
dist/assets/icons-DQndEtzL.woff2 79.44 kB
dist/assets/brand-icons-DqZqNCSp.woff 89.82 kB
dist/assets/icons-Ic6bH3kJ.woff 103.30 kB
dist/assets/brand-icons-BvOfcHLm.ttf 132.73 kB
dist/assets/brand-icons-BP-byM1z.eot 133.03 kB
dist/assets/outline-icons-DYS_BsKA.svg 144.32 kB │ gzip: 37.19 kB
dist/assets/icons-v_-DUAvR.ttf 202.62 kB
dist/assets/icons-DRNqNWD9.eot 202.90 kB
dist/assets/brand-icons-CwYvrPXy.svg 715.89 kB │ gzip: 241.87 kB
dist/assets/icons-QT1_Ihr7.svg 897.43 kB │ gzip: 248.88 kB
dist/assets/index-DJ2rSPac.css 1,353.90 kB │ gzip: 162.11 kB
dist/assets/index-CMPxcq1w.js 1,008.36 kB │ gzip: 309.94 kB
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 1.34s
✨ Done in 1.75s. What build errors are you seeing? |
Hey @jaredperreault-okta, there is no error in the build, but Post build |
any clue on it? |
I am not able to reproduce your issue. Do you experience the same issue with the sample? |
I have a very similar issue. In development, locally, everything works. However, when deployed behind nginx, the app ends on the |
@31453 Are you able to test your nginx configuration with this sample app? Are you certain your nginx configuration is routing the path of requests to the app. This usually involves some sort of wildcard routing rule. If all requests to the app resolve as |
@jaredperreault-okta I haven't tried the sample app because my application architecture is slightly different from it. package.json
vite.config.js
main.js
App.vue
router.js
For understanding I have added the Below Image is when deployed in S3 bucket using codebuild. I understood that after the first redirect the app should land on Here is the build
|
I believe this is the problem you're running into. If your app never navigates to The Vue development server will route all the network traffic correctly, so in dev mode every works because the redirect from the Authorization Server lands on the Your deployed environment doesn't seem to be routing the traffic correctly. Serving web apps from a server environment usually requires some sort of wildcard routing that maintains the correct path If your app works under the following entrypoints:
|
Okay, what is the solution I should try to fix this. |
I am going to assume by this comment you tried I am closing because this issue doesn't seem related to |
Hi,
I am using vue 3 with vite build tool.
Okta routing is working fine as expected when I am accessing the application but when I deployed in Dev Env the below error is showing in console.log
index.js:76 [okta-auth-sdk] WARN: a saved auth transaction exists in storage. This may indicate another auth flow is already in progress.
Versions I am using in my project
node: 20.9.0
"vue": "^3.4.21",
"vite": "^5.2.10",
"@okta/okta-auth-js": "^7.5.1",
"@okta/okta-vue": "^5.7.0".
Initially I thought it is a okta-vue issue so I raised a bug ticket in Okta-Vue but I understood that there is some issue with Okta Auth. Please check the below screenshot.
Reproduction Steps?
Since this is not my personal project, I am not posting any steps to reproduce.
SDK Versions
"node": "20.9.0",
"vue": "^3.4.21",
"vite": "^5.2.10",
"@okta/okta-auth-js": "^7.5.1",
"@okta/okta-vue": "^5.7.0".
Additional Information?
No response
The text was updated successfully, but these errors were encountered: