-
Notifications
You must be signed in to change notification settings - Fork 927
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
Config format #66
Comments
It is not directly related to I am not agreeing with your structure proposal which would mostly be a rollback to 3.0 which was: const defaults = {
user: {
endpoint: 'auth/user',
propertyName: 'user',
resetOnFail: true,
enabled: true,
method: 'GET'
},
login: {
endpoint: 'auth/login',
},
logout: {
endpoint: 'auth/logout',
method: 'GET',
},
redirect: {
notLoggedIn: '/login',
loggedIn: '/'
},
token: {
enabled: true,
type: 'Bearer',
localStorage: true,
name: 'token',
cookie: true,
cookieName: 'token'
}
} Structuring only by actions was what was done in For further explanation :
I am formerly disagreeing with your proposal, but I am leaving this discussion open for others to add their concerns to this debate. I find current the current structure to be a good fit between modularity and explicitness, but could be clearer and have better options naming. |
Thanks @breakingrobot that all makes sense, |
Hi, I'm loving the changes for 4.0, but I feel the config structure could use a little work to better group options. I was thinking about structuring the options based on the 'actions' (login, logout, fetch user - a bit like v3), but rolling in the redirects with each action - for me there is a bit of confusion about how the redirects work, and thought something like this would be a bit more explicit to configure. Default options could look something like this:
I added an
autoClearHeader
option to the logout action (which would be the logical place to configure a fix for #57). I'm not 100% sure whatwatchLoggedIn
actually does, but that could be moved to the login and/or logout options... Anyway, thought I would throw this out there!The text was updated successfully, but these errors were encountered: