{"id":17018179,"url":"https://github.com/loitd/vue-all-auth","last_synced_at":"2025-03-22T16:31:17.180Z","repository":{"id":34292913,"uuid":"174974141","full_name":"loitd/vue-all-auth","owner":"loitd","description":"Vue.js All Auth","archived":false,"fork":false,"pushed_at":"2024-03-04T04:27:53.000Z","size":926,"stargazers_count":2,"open_issues_count":14,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T13:46:00.723Z","etag":null,"topics":["api","auth","authentication","facebook","github","google","login","logout","plugin","signin","signout","vue","vue-all-auth","vue2","vuejs"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/loitd.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-11T10:09:50.000Z","updated_at":"2024-03-03T15:12:05.000Z","dependencies_parsed_at":"2024-10-28T14:15:13.571Z","dependency_job_id":"0d9193d3-615d-4503-962e-08e34c5b9447","html_url":"https://github.com/loitd/vue-all-auth","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/loitd%2Fvue-all-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loitd%2Fvue-all-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loitd%2Fvue-all-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loitd%2Fvue-all-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loitd","download_url":"https://codeload.github.com/loitd/vue-all-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244986560,"owners_count":20543033,"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":["api","auth","authentication","facebook","github","google","login","logout","plugin","signin","signout","vue","vue-all-auth","vue2","vuejs"],"created_at":"2024-10-14T06:44:48.048Z","updated_at":"2025-03-22T16:31:16.623Z","avatar_url":"https://github.com/loitd.png","language":"HTML","funding_links":["https://www.patreon.com/loitd","https://www.paypal.me/loitd"],"categories":[],"sub_categories":[],"readme":"# vue-all-auth\nVue.js All Social Authentication\n# Sponsors \u0026 Backers\nVue.js All Auth is a MIT-based open source project. If you'd like to support me please consider:\n[Become a backer or sponsor on Patreon](https://www.patreon.com/loitd)\n[One time donation via Paypal](https://www.paypal.me/loitd)\n## How it made\nI wrote this plugin when completing authentication part of a larger project called [Vue-quick-template](https://github.com/loitd/vue-quick-template) since at this time (Mar-2019), I couldn't find any social authentication plugin for Vue.js suit my need.  \nI am glad that this plugin can help you in your projects.\n## Installation\n```\nyarn add -D vue-all-auth\n```\nIf you have old version and want to update to new released version: Using the same command, `yarn` will automatically pull latest version for you.\n## Using\nIf you use [Vue-quick-template](https://github.com/loitd/vue-quick-template) then I already set it up for you. Just go to `/src/plugins/allauth.js` for initialization.  \nIf you already have your Vue.js project setup:  \n* Create a folder and file `/src/plugins/allauth.js` and at `main.js` add this line:\n```\nimport \"./plugins/allauth\";\n```\n* In `src/plugins/allauth.js` add these lines:  \n```\nimport VueAllAuth from \"vue-all-auth\";\nVue.use(VueAllAuth, { \n    google: {\n        // keys for google\n        client_id: \"YOUR_GG_APP_ID.apps.googleusercontent.com\", \n        scope: \"profile email\",\n    }, \n    facebook: {\n        // keys for fb\n        appId: \"YOUR_FB_APP_ID\",\n        cookie: true,\n        xfbml: true,\n        version: \"v3.2\",\n    },\n    twitter: {\n        // keys for twitter\n    },\n    github: {\n        // keys for github\n    }\n    \n});\nVue.allAuth().google().init();\nVue.allAuth().facebook().init();\n```\n* Inside Vue.js component file:\n```\n# Template part\n\u003c!-- Google login button --\u003e\n\u003cb-form-group\u003e\n    \u003cb-button type=\"submit\" variant=\"danger\" @click=\"ggSignIn\"  style=\"min-width: 15rem;\"\u003e\n        \u003cfont-awesome-icon :icon=\"['fab', 'google']\" class=\"mr-1\"/\u003e\n        Continue with Google\n    \u003c/b-button\u003e\n\u003c/b-form-group\u003e\n```\nJavascript part:  \n```\nimport Vue from \"vue\";\nexport default {\n    name: \"SocialLoginForm\",\n    methods: {\n        ggSignIn: function (event) {\n            // Prevent default action\n            event.preventDefault()\n            // console.log(\"Begin google authentication!\");\n            Vue.allAuth().google().init()\n            // console.log(\"This is this before calling allAuth(): \");\n            let that = this\n            Vue.allAuth().google().signIn(function (googleUser) {\n                // console.log(\"This is googleUser in SocialLoginForm: \"+googleUser);\n                Vue.allAuth().google().printInfo() //just to check what you received\n                // console.log(\"This is this in SocialLoginForm: \");\n                // console.log(this); //--\u003e at this time, this is undefined, that will be a Vue instance\n                that.$router.push(\"/\")\n            }, function (error) {\n                console.log(\"Something went wrong!\");\n                console.log(error);\n            })\n        },\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floitd%2Fvue-all-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floitd%2Fvue-all-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floitd%2Fvue-all-auth/lists"}