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

After Successful Login Automatically Show the App #43

Open
2 tasks done
nelsonic opened this issue Apr 6, 2020 · 6 comments
Open
2 tasks done

After Successful Login Automatically Show the App #43

nelsonic opened this issue Apr 6, 2020 · 6 comments
Assignees
Projects

Comments

@nelsonic
Copy link
Member

nelsonic commented Apr 6, 2020

At present, after successful authentication, we are presented with this screen:
image

As a user I don't want to have to click a button/link before seeing the app interface.

Todo

  • Automatically show the interface with my items/timers
  • Automatically "focus" the cursor on the text area to input an item.
@nelsonic nelsonic added enhancement New feature or request discuss labels Apr 6, 2020
@nelsonic nelsonic added this to To do in dwyl app via automation Apr 6, 2020
@SimonLab
Copy link
Member

SimonLab commented Apr 6, 2020

I agree with displaying the list of captures once the user is authenticated.
This page can even be removed entirely as we can display the navigations at the top of the pages.

@SimonLab SimonLab self-assigned this Apr 6, 2020
@SimonLab SimonLab added the T2h label Apr 6, 2020
@SimonLab
Copy link
Member

SimonLab commented Apr 6, 2020

Removing the current home page means redefining the routes and url parser:

type Route
= Home
| Auth (Maybe String)
| Logout
| Capture
| CaptureTimers Int
routeParser : Parser.Parser (Route -> a) a
routeParser =
Parser.oneOf
[ Parser.map Home Parser.top
, Parser.map Auth (Parser.s "auth" <?> Query.string "jwt")
, Parser.map Logout (Parser.s "logout")
, Parser.map CaptureTimers (Parser.s "capture" </> Parser.int)
, Parser.map Capture (Parser.s "capture")
]

We also need to make sure to redirect to the authentication page when ther user is not logged in anymore.

@SimonLab SimonLab moved this from To do to In progress in dwyl app Apr 6, 2020
@SimonLab SimonLab mentioned this issue Apr 6, 2020
2 tasks
@SimonLab
Copy link
Member

SimonLab commented Apr 6, 2020

Creating a login page where the user is redirected when not authenticated yet.
Currently the not logged in yet message needs to be created on all the pages:

, case model.session of
Session.Guest _ ->
link [ centerX ]
{ url = Route.routeToString Route.Home
, label = text "Not logged in yet!"
}

We can instead check the session of the user when the page is initialised and redirect to the new login page.

@nelsonic
Copy link
Member Author

nelsonic commented Apr 6, 2020

@SimonLab the login page will be covered by Auth. 👍

@SimonLab
Copy link
Member

SimonLab commented Apr 6, 2020

Yes at the moment the auth page is currently displayed when the session of the user is "guest":
image

I wanted to see if a login page could provide a nicer transition as for now when a session expired or when the user logout, the application redirect automatically to this auth page. This felt a bit abrupt and I think having a login page would help to explain why the user is not logged in anymore (session expired, logout...) and the user can choose to login again.
So the login page will only have some explanation text and a login link which redirect to the auth service. We can try this flow and if this step is not necessary it will be easy to remove.

@nelsonic
Copy link
Member Author

nelsonic commented Apr 6, 2020

@SimonLab what you are describing is a great feature to be added to https://github.com/dwyl/auth 💡
Let's open a separate issue for that. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
dwyl app
  
In progress
Development

No branches or pull requests

2 participants