-
Notifications
You must be signed in to change notification settings - Fork 174
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
Improvements for dex auth #251
Improvements for dex auth #251
Conversation
…ss_token or id_token exist in the url, small contextswitcher bug, refactored backdrop since inline if-elses are breaking in svelte oncreate,
…nts-for-dex-auth # Conflicts: # core/src/navigation/services/navigation.js
core/src/services/routing.js
Outdated
@@ -288,6 +288,12 @@ const buildRoute = (node, path, params) => | |||
: buildRoute(node.parent, `/${node.parent.pathSegment}${path}`, params); | |||
|
|||
export const handleRouteChange = async (path, component, node, config) => { | |||
if ( | |||
window.location.href.indexOf('access_token') !== -1 || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Can we do this check a bit more specific? At least indexOf('access_token=').
- Can we make it configurable? Like list of regex expressions for paths to be ignored by Luigi routing? That way the Luigi app owner would have full control over it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thats a good idea :-)
methods: { | ||
setBackdropClass() { | ||
const baseClasses = 'fd-ui__overlay fd-overlay fd-overlay--modal '; | ||
if (!this.get().backdropActive) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I highly recommend https://www.npmjs.com/package/classnames for this. It can do exactly the same what this function does but with less code :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less code, but more dependencies. Not a fan of this. I guess if we want to have it, we can write it by ourself with a small helper function. similar to ['class1', 'class2'].join(' ')
.
@@ -51,6 +53,7 @@ | |||
import LogoTitle from './LogoTitle.html'; | |||
import Authorization from '../Authorization.html'; | |||
import { handleRouteClick } from '../services/routing.js'; | |||
import * as Navigation from './services/navigation.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about {isLoggedIn}
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this intentionally to make it easier to distinguish between internal and imported functions, but it is a pure matter of taste.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small comment.
Co-Authored-By: kwiatekus <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
…kus/luigi into feature/improvements-for-dex-auth
This reverts commit e2501ee.
no actions taken based on the comments, verified with kk
* added possibility for root redirect_uris by disabling routing if access_token or id_token exist in the url, small contextswitcher bug, refactored backdrop since inline if-elses are breaking in svelte oncreate, * iframe resiliency for logout * added logout.html and changed logoutUrl, fixed small bugs causing errors * added skipRoutingForUrlPatterns configuration setting for skipping route handling * Update docs/navigation-configuration.md
Improvements which are required for console.