{"id":14965463,"url":"https://github.com/nette-examples/user-authentication","last_synced_at":"2025-04-07T13:05:48.382Z","repository":{"id":45853417,"uuid":"415267443","full_name":"nette-examples/user-authentication","owner":"nette-examples","description":"Example of user management in Nette","archived":false,"fork":false,"pushed_at":"2025-03-13T02:25:00.000Z","size":52,"stargazers_count":12,"open_issues_count":2,"forks_count":21,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-17T09:41:33.161Z","etag":null,"topics":["authentication","nette","nette-example","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nette-examples.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-09T09:48:24.000Z","updated_at":"2025-03-13T02:25:04.000Z","dependencies_parsed_at":"2023-11-07T03:11:18.036Z","dependency_job_id":"16c3f2d8-a05e-4fb6-8108-93b4d3c037a2","html_url":"https://github.com/nette-examples/user-authentication","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"31bb1cbe02295df17db7c162595530e0a8541698"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette-examples%2Fuser-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette-examples%2Fuser-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette-examples%2Fuser-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nette-examples%2Fuser-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nette-examples","download_url":"https://codeload.github.com/nette-examples/user-authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657276,"owners_count":20974344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","nette","nette-example","php"],"created_at":"2024-09-24T13:34:47.275Z","updated_at":"2025-04-07T13:05:48.355Z","avatar_url":"https://github.com/nette-examples.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"User Authentication (Nette example)\n===================================\n\nExample of user management.\n\n- User login, registration and logout (`SignPresenter`)\n- Command line registration (`bin/create-user.php`)\n- Authentication using database table (`UserFacade`)\n- Password hashing\n- Presenter requiring authentication (`DashboardPresenter`) using the `RequireLoggedUser` trait\n- Rendering forms using Bootstrap CSS framework\n- Automatic CSRF protection using a token when the user is logged in (`FormFactory`)\n- Separation of form factories into independent classes (`SignInFormFactory`, `SignUpFormFactory`)\n- Return to previous page after login (`SignPresenter::$backlink`)\n\n\nInstallation\n------------\n\n```shell\ngit clone https://github.com/nette-examples/user-authentication\ncd user-authentication\ncomposer install\n```\n\nMake directories `data/`, `temp/` and `log/` writable.\n\nBy default, SQLite is used as the database which is located in the `data/db.sqlite` file. If you would like to switch to a different database, configure access in the `config/local.neon` file:\n\n```neon\ndatabase:\n\tdsn: 'mysql:host=127.0.0.1;dbname=***'\n\tuser: ***\n\tpassword: ***\n```\n\nAnd then create the `users` table using SQL statements in the [data/mysql.sql](data/mysql.sql) file.\n\nThe simplest way to get started is to start the built-in PHP server in the root directory of your project:\n\n```shell\nphp -S localhost:8000 www/index.php\n```\n\nThen visit `http://localhost:8000` in your browser to see the welcome page.\n\nIt requires PHP version 8.1 or newer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnette-examples%2Fuser-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnette-examples%2Fuser-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnette-examples%2Fuser-authentication/lists"}