Skip to content
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

Added router to rediect github auth #9262

Merged

Conversation

bisht-richa
Copy link
Contributor

@bisht-richa bisht-richa commented Jul 4, 2023

Summary

Fixes #9138

Fixed issue - Unable to use Auth Providers when running locally

To test

setup github auth provider

@bisht-richa bisht-richa requested a review from richard-cox July 4, 2023 11:24
@github-actions github-actions bot added this to the v2.7.next3 milestone Jul 4, 2023
@nwmac
Copy link
Member

nwmac commented Jul 4, 2023

This used to work pre-Nuxt removal - this was handled by shell/server/server-middleware.js.

This was removed when we removed Nuxt - although the server-middleware.js file is still in the codebase. It looks like serverMiddleware in shell/vue.config.js is never used - it did not get wired into vue.config (where as it was wired into nuxt.config).

We should be able to wire serverMiddleware back into vue.config via setupMiddlewares on devServer - see: https://cli.vuejs.org/config/#devserver and https://webpack.js.org/configuration/dev-server/#devserversetupmiddlewares

NOTE: This needs to be wired in ONLY when running in dev locally - which the above would do - the current code in this PR wires this in, in all cases.

@richard-cox ^^^

@bisht-richa bisht-richa force-pushed the configuring-auth-provider-locally branch from fb82b4b to 58444c9 Compare July 10, 2023 16:10
Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This hasn't covered part of the request from #9138 (comment)

  • the process to add server middleware via the old serverMiddleware array is still in shell/vue.config.js. At the very least serverMiddleware.push(path.resolve(dir, SHELL, 'server', 'server-middleware')); should be removed
  • there's no clear way forward to address that now defunct old method using the serverMiddleware array (specifically the other parts that don't work in post nuxt world). Can you create an issue to cover them?

@bisht-richa
Copy link
Contributor Author

  • there's no clear way forward to address that now defunct old method using the serverMiddleware array (specifically the other parts that don't work in post nuxt world).

I have removed unused code and created an issue for serverMiddleware array : #9312

@bisht-richa bisht-richa requested a review from richard-cox July 13, 2023 10:45
@bisht-richa bisht-richa force-pushed the configuring-auth-provider-locally branch from 3e32ece to 2f2f542 Compare July 13, 2023 10:59
@bisht-richa bisht-richa merged commit 141d277 into rancher:master Jul 14, 2023
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.

Unable to use Auth Providers when running locally
3 participants