{"id":15046086,"url":"https://github.com/remotebase/meteor-auth","last_synced_at":"2025-10-25T20:31:46.272Z","repository":{"id":57295802,"uuid":"54855282","full_name":"remotebase/meteor-auth","owner":"remotebase","description":"A user authentication solution for Mantra applications","archived":false,"fork":false,"pushed_at":"2016-06-05T01:08:08.000Z","size":7,"stargazers_count":34,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T10:25:39.321Z","etag":null,"topics":["mantra","meteor"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/remotebase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-28T00:52:05.000Z","updated_at":"2020-03-22T02:43:27.000Z","dependencies_parsed_at":"2022-08-30T22:30:55.609Z","dependency_job_id":null,"html_url":"https://github.com/remotebase/meteor-auth","commit_stats":null,"previous_names":["sungwoncho/meteor-auth"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotebase%2Fmeteor-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotebase%2Fmeteor-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotebase%2Fmeteor-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remotebase%2Fmeteor-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remotebase","download_url":"https://codeload.github.com/remotebase/meteor-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238207646,"owners_count":19434095,"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":["mantra","meteor"],"created_at":"2024-09-24T20:52:41.325Z","updated_at":"2025-10-25T20:31:40.965Z","avatar_url":"https://github.com/remotebase.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# meteor-auth\n\nA user authentication solution for Mantra applications\n\n\n## Installation\n\n    npm install -s meteor-auth\n\n\n## Usage\n\nThis module includes:\n\n* `authComposer`\n* `EnsureLoggedIn`\n\n\n### authComposer\n\nCompose a component with `authComposer` using `composeWithTracker`. The\ncomponent will reactively receive `loggedIn` and `loggingIn` props.\n\n*container*\n\n```js\nimport {composeAll, composeWithTracker} from 'mantra-core';\nimport MyComponent from '../components/my_component.jsx';\nimport {authComposer} from 'meteor-auth';\n\n// ...\n\nreturn composeAll(\n  composeWithTracker(authComposer),\n)(MyComponent);\n```\n\n*component*\n\n```js\nimport React form 'react'\n\nconst MyComponent = ({loggedIn, loggingIn}) =\u003e (\n  {\n    loggedIn ? \u003cdiv\u003eWelcome\u003c/div\u003e :\n    loggingIn ? \u003cdiv\u003eLoading...\u003c/div\u003e : \u003cdiv\u003ePlease log in\u003c/div\u003e\n  }\n);\n```\n\n### EnsureLoggedIn\n\nWrap a content with `\u003cEnsureLoggedIn\u003e` to make sure only logged in users can\nsee the content.\n\n```js\nimport React form 'react'\nimport {EnsureLoggedIn} from 'meteor-auth';\n\nconst MyComponent = () =\u003e (\n  \u003cEnsureLoggedIn\u003e\n    \u003cdiv\u003eWelcome\u003c/div\u003e\n  \u003c/EnsureLoggedIn\u003e\n);\n```\n\n#### props\n\n**unauthenticatedMessage**\n\n* type: React component\n* Replace the default component displayed when user is not logged in\n* example:\n\n```js\nconst Dashboard = () =\u003e (\n  \u003cEnsureLoggedIn unauthenticatedMessage={NotLoggedInMessage}\u003e\n    \u003cDashboardView /\u003e\n  \u003c/EnsureLoggedIn\u003e\n);\n\nconst NotLoggedInMessage = (\n  \u003cdiv\u003e\n    Please login. \u003ca href=\"/\"\u003eGo back to the main page\u003c/a\u003e.\n  \u003c/div\u003e\n);\n```\n\n## Production ready\n\nWe are using `meteor-auth` in [RemoteBase](https://remotebase.io) to serve\nactual users.\n\n![](https://cldup.com/QUydmNJ7Ea.gif)\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremotebase%2Fmeteor-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremotebase%2Fmeteor-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremotebase%2Fmeteor-auth/lists"}