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

Genie tutorial authentication redirection fail #15

Closed
ghost opened this issue Jul 8, 2022 · 0 comments
Closed

Genie tutorial authentication redirection fail #15

ghost opened this issue Jul 8, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 8, 2022

I am following the Genie tutorial: https://www.genieframework.com/docs/genie/tutorials/Developing-MVC-Web-Apps.html
I have got to the 'Bonus' section, for implementing authentication.
Have created a user table using SearchLite and created an admin user.

routes.jl:
using Genie.Router, MoviesController, AdminController

route("/") do
serve_static_file("welcome.html")
end

route("/movies", MoviesController.index)
route("/movies/search", MoviesController.search, named = :search_movies)
route("/admin/movies", AdminController.index, named = :get_home)

AdminController:
module AdminController

using GenieAuthentication, Genie.Renderer, Genie.Exceptions, Genie.Renderer.Html

function index()
@authenticated!
h1("Welcome Admin") |> html
end

end

Browse to: http://127.0.0.1:8000/admin/movies
I expect to be challenged for credentials.
What I see is a blank screen, except for 'Redirecting you to'

Julia version: 1.7.3
Genie version: 4.18.1
Genie Authentication version 1.2.0

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

No branches or pull requests

1 participant