Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@xtiannyeto/vue-auth-social
Advanced tools
Use social authentication Facebook / Google with Vue 3 composition api
Use social authentication Facebook / Google with Vue 3 composition api
Use the package manager yarn or npm to install vue-auth-social.
yarn add @xtiannyeto/vue-auth-social
npm install @xtiannyeto/vue-auth-social
in your main css or scss file
@import '~vue-auth-social/dist/vue-auth-social.css';
Using Auth Modal you need tailwind in your main css or scss file
@import '~tailwindcss/base';
@import '~tailwindcss/components';
@import '~tailwindcss/utilities';
<FacebookAuth :appId="facebookAppId" @on-submit="facebook">
Facebook <!-- Whatever you want event your own custom button-->
</FacebookAuth>
import { defineComponent } from 'vue';
import { FacebookAuth } from '@xtiannyeto/vue-auth-social';
export default defineComponent({
name: 'xxx',
components: {
...
FacebookAuth,
...
},
setup() {
const facebookAppId = process.env.FACEBOOK_APP_ID; // your facebook application ID
return { facebookAppId };
},
methods: {
facebook(event: any) {
console.log(event); // event response handler
}
}
});
<GoogleAuth :clientId="googleClientId" @on-submit="google">
Google <!-- Whatever you want, even your own custom button -->
</GoogleAuth>
import { defineComponent } from 'vue';
import { GoogleAuth } from '@xtiannyeto/vue-auth-social';
export default defineComponent({
name: 'xxx',
components: {
...
GoogleAuth,
...
},
setup() {
const googleClientId = process.env.GOOGLE_CLIENT_ID; // your Google Client ID
return { googleClientId };
},
methods: {
google(event: any) {
console.log(event); // event response handler
}
}
});
<Auth ref="authRef"
:logo="YOUR_ICON_PATH"
:color="MAIN_COLOR" <!-- tailwind color, indigo by default -->
:facebookAppId="facebookAppId"
:googleClientId="googleClientId"
@on-google="google"
@on-facebook="facebook">
Login <!-- Whatever you want, even your own custom button -->
</Auth>
import { defineComponent } from 'vue';
import { Auth } from '@xtiannyeto/vue-auth-social';
export default defineComponent({
name: 'xxx',
components: {
Auth
},
setup() {
const facebookAppId = process.env.FACEBOOK_APP_ID; // your application ID
const googleClientId = process.env.GOOGLE_CLIENT_ID; // your Google Client ID
return { googleClientId, facebookAppId };
},
methods: {
facebook(event: any) {
console.log(event);
},
google(event: any) {
console.log(event);
}
}
});
In previe
<Auth ref="authRef"
....
:color="MAIN_COLOR"
:userPassword="true" <!-- active user / Mp auth on modal and register -->
.......
.......
@on-signin="signin" <!-- handle signIn -->
@on-signup="signup"> <!-- handle signup -->
Login
</Auth>
.....
signIn(event: any) {
console.log(event);
},
signUp(event: any) {
console.log(event);
}
.....
<Auth ref="authRef"
Login
</Auth>
<button @click="closeAuth">Close</button>
setup() {
const authRef: any = ref(null);
function closeAuth() {
authRef.value?.close();
}
return { authRef, closeAuth, ...};
}
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
Use social authentication Facebook / Google with Vue 3 composition api
The npm package @xtiannyeto/vue-auth-social receives a total of 31 weekly downloads. As such, @xtiannyeto/vue-auth-social popularity was classified as not popular.
We found that @xtiannyeto/vue-auth-social demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.