mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-25 12:26:05 +08:00
e9766ed7a5
* Add token authentication * Restructure CLI * Allow port configuration * Further refactoring * Make sure livebook node starts with unique name * Improve startup error handling * Further refactoring * Add authentication tests * Add authentication view for entering the token * Fix auth tests * Always use random Livebook name for distribution * Don't enable ANSI on Windows * Define CLI Task behaviour and move generic logic to the main module * Generalize convertion from cli arguments to configuration * Randomly generate secret key base * Update test/livebook_web/plugs/auth_plug_test.exs Co-authored-by: José Valim <jose.valim@dashbit.co> * Override app config in persistent manner * Update lib/litebook_cli.ex Co-authored-by: José Valim <jose.valim@dashbit.co> * Move auth error to ErrorView * Unify node name configuration and allow it via CLI * Set all applications configs at once * Move token generation to application.ex to work outside CLI * Clean up overriding configuration * Store auth token in separate cookies * Update lib/livebook_cli/server.ex Co-authored-by: José Valim <jose.valim@dashbit.co> * Update lib/livebook_web/endpoint.ex Co-authored-by: José Valim <jose.valim@dashbit.co> * Update lib/livebook_web/plugs/auth_plug.ex Co-authored-by: José Valim <jose.valim@dashbit.co> Co-authored-by: José Valim <jose.valim@dashbit.co>
35 lines
1.2 KiB
Elixir
35 lines
1.2 KiB
Elixir
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
|
<%= live_title_tag "Livebook" %>
|
|
<link phx-track-static rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
|
|
</head>
|
|
<body>
|
|
<div class="h-screen flex items-center justify-center bg-gray-900">
|
|
<div class="flex flex-col space-y-4 items-center">
|
|
<a href="/">
|
|
<img src="/logo.png" height="128" width="128" alt="livebook" />
|
|
</a>
|
|
<div class="text-2xl text-gray-50">
|
|
Authentication required
|
|
</div>
|
|
<div class="max-w-2xl text-center text-gray-300">
|
|
Please check out the console for authentication URL
|
|
or type the token directly here.
|
|
</div>
|
|
<div class="text-2xl text-gray-50 w-full pt-2">
|
|
<form method="get" class="flex flex-col space-y-4 items-center">
|
|
<input type="text" name="token" class="input" placeholder="Token" />
|
|
<button type="submit" class="button button-blue">
|
|
Authenticate
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|