{"id":19199734,"url":"https://github.com/cosmic-fi/oriauth","last_synced_at":"2026-04-28T01:32:54.418Z","repository":{"id":202168192,"uuid":"707460212","full_name":"cosmic-fi/OriAuth","owner":"cosmic-fi","description":"Ori-Auth is a simple TypeScript npm package designed to handle Firebase authentication. It offers a set of easy-to-use functions for creating users, retrieving user data, logging in, resetting passwords, and logging out.","archived":false,"fork":false,"pushed_at":"2023-10-20T17:44:48.000Z","size":36456,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T00:14:14.948Z","etag":null,"topics":["authentication","firebase","firebase-auth","firebase-authentication","firebase-user","password-reset","user-authentication","user-management"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cosmic-fi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-10-20T00:31:07.000Z","updated_at":"2024-05-15T19:45:02.000Z","dependencies_parsed_at":"2024-03-30T03:31:59.652Z","dependency_job_id":null,"html_url":"https://github.com/cosmic-fi/OriAuth","commit_stats":null,"previous_names":["cosmic-fi/oriauth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cosmic-fi/OriAuth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmic-fi%2FOriAuth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmic-fi%2FOriAuth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmic-fi%2FOriAuth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmic-fi%2FOriAuth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cosmic-fi","download_url":"https://codeload.github.com/cosmic-fi/OriAuth/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cosmic-fi%2FOriAuth/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259546413,"owners_count":22874560,"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","firebase","firebase-auth","firebase-authentication","firebase-user","password-reset","user-authentication","user-management"],"created_at":"2024-11-09T12:28:45.567Z","updated_at":"2025-06-12T23:03:46.594Z","avatar_url":"https://github.com/cosmic-fi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cimg src=\"https://github.com/cosmic-fi/OriAuth/assets/64766541/22785308-676b-485a-8ffb-e8327051a9ff\" width=\"100%\"/\u003e\n\n## \nOri-Auth is a simple Javascrtipt npm package designed to handle Firebase authentication. It offers a set of easy-to-use functions for creating users, retrieving user data, logging in, resetting passwords, and logging out.\n\n## Installation\n\nYou can install Ori-Auth via npm or yarn:\n\n```bash\nnpm install ori-auth\n```\nor\n\n```bash\nyarn add ori-auth.\n```\n\n## Usage\nTo use this package, import it in your project:\n  \n```javascript\nconst OriAuth = require('ori-auth');\nconst auth = new OriAuth();\n```\n\n**Configuration**\nTo use this package, you need to configure it with your Firebase project details. \nPass your Firebase project configuration object to the config method:\n\n```javascript\nconst config = {\n  apiKey: 'your-api-key',\n  authDomain: 'your-auth-domain',\n  projectId: 'your-project-id',\n  storageBucket: 'your-storage-bucket',\n  messagingSenderId: 'your-messaging-sender-id',\n  appId: 'your-app-id',\n};\n\nauth.config(firebaseConfig);\n```\n\n## API Methods\n`createUser(email: string, password: string, username: string): Promise\u003cstring\u003e`\n- Creates a new user with an email, password, and username. Returns the UID of the created user.\n\n`getUser(email: string, password: string): Promise\u003cany\u003e`\n- Logs in a user with an email and password, then retrieves the user's data from Firestore. Returns an object with the user's username and UID.\n\n`login(email: string, password: string): Promise\u003cvoid\u003e`\n- Logs in an existing user with an email and password.\n\n`resetPassword(email: string): Promise\u003cvoid\u003e`\n- Sends a password reset email to the given email address.\n\n`logout(): Promise\u003cvoid\u003e`\n- Logs the user out.\n\n## Example\n```javascript\nconst OriAuth = require('ori-auth');\nconst auth = new OriAuth();\n\nconst config = {\n  apiKey: 'your-api-key',\n  authDomain: 'your-auth-domain',\n  projectId: 'your-project-id',\n  storageBucket: 'your-storage-bucket',\n  messagingSenderId: 'your-messaging-sender-id',\n  appId: 'your-app-id',\n};\n\nauth.config(config);\n\nasync function run() {\n  try {\n    const uid = await auth.createUser('user@example.com', 'password123', 'myusername');\n    console.log('Created user with UID:', uid);\n\n    const userData = await auth.getUser('user@example.com', 'password123');\n    console.log('User data:', userData);\n\n    await auth.login('user@example.com', 'password123');\n    console.log('Logged in');\n\n    await auth.resetPassword('user@example.com');\n    console.log('Password reset email sent');\n\n    await auth.logout();\n    console.log('Logged out');\n  } catch (error) {\n    console.error('Error:', error.message);\n  }\n}\n\nrun();\n```\n## License\n\nThis project is licensed under the MIT License. For more details, please see the [LICENSE][license-link] file.\n\n\n\n\n[license-link]: https://github.com/cosmic-fi/OriAuth/blob/main/LICENSE.md","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmic-fi%2Foriauth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcosmic-fi%2Foriauth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcosmic-fi%2Foriauth/lists"}