{"id":20366048,"url":"https://github.com/warborn/hybrid-app","last_synced_at":"2026-06-06T17:33:23.418Z","repository":{"id":39087477,"uuid":"273555008","full_name":"warborn/hybrid-app","owner":"warborn","description":"Rails app that supports Session and JWT authentication methods","archived":false,"fork":false,"pushed_at":"2023-01-19T19:31:11.000Z","size":935,"stargazers_count":0,"open_issues_count":28,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T04:40:50.790Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/warborn.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}},"created_at":"2020-06-19T17:51:37.000Z","updated_at":"2020-06-23T19:20:32.000Z","dependencies_parsed_at":"2023-02-05T19:01:49.270Z","dependency_job_id":null,"html_url":"https://github.com/warborn/hybrid-app","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fhybrid-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fhybrid-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fhybrid-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/warborn%2Fhybrid-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/warborn","download_url":"https://codeload.github.com/warborn/hybrid-app/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241907758,"owners_count":20040529,"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":[],"created_at":"2024-11-15T00:22:06.538Z","updated_at":"2026-06-06T17:33:23.373Z","avatar_url":"https://github.com/warborn.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThis project demonstrate the use of `session` and `JWT` authentication in the same app.\n\nFor the `JWT` authentication supports two mechanisms `REST` and `GraphQL`\n\n## Installation\n\nClone the project and install the dependencies\n\n```sh\ngit clone git@github.com:warborn/hybrid-app.git\n\ncd hybrid-app\n\nbundle install\n\nyarn install\n\n```\n\nPrepare the database and start the server\n\n```sh\nrails db:setup\n\nrails s\n```\n\nYou can view the app live [here](http://localhost:3000)\n\n## Sign up\n\nYou can create a new account [here](http://localhost:3000/users/sign_up)\n\n## GraphQL API\n\nThe project supports authentication via GraphQL, you can use the following queries:\n\n### Login\n\n```graphql\nmutation LOGIN {\n  login(email: \"user@app.com\", password: \"password\") {\n    email\n    id\n    token\n  }\n}\n```\n\n### Logout\n\n```graphql\nmutation {\n  logout\n}\n```\n\n### Getting logged in user data:\n\n```graphql\nquery {\n  me {\n    id\n    email\n  }\n}\n```\n\nGraphQL is mounted in the route `/api/graphql`\n\nNote: The `logout` mutation and `me` query are protected by the authentication mechanism, in order to run them properly, an authorization header with a valid token should be sent along with the request.\n\n```\nAuthorization: Bearer {VALID_TOKEN}\n```\n\n## REST API\n\nThe project supports authentication via a REST API\n\n### Login:\n\n`[POST] -\u003e /api/login`\n```json\n{\n\t\"api_user\": {\n\t\t\"email\": \"root@app.com\",\n\t\t\"password\": \"password\"\n\t}\n}\n```\n\n### Logout:\n\n`[DELETE] -\u003e /api/logout`\n\n#### Get current user data:\n\n`[GET] -\u003e /api/users/me`\n\nNote: The `/api/logout` `/api/users/me` endpoints are protected by the authentication mechanism, in order to run them properly, an authorization header with a valid token should be sent along with the request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarborn%2Fhybrid-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwarborn%2Fhybrid-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwarborn%2Fhybrid-app/lists"}