npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

vue3-apple-login

v0.1.0

Published

Vue 3 Apple Login Component

Readme

vue3-apple-login

A Vue 3 plugin/component for implementing Sign in with Apple.

normal black apple button rectangular black apple button normal white apple button

This component offers the following features

  • Normal Sign in / Sign up / Continue with Apple button
  • Apple login using a custom button

Installation

npm install vue3-apple-login

Usage

Simple Global Plugin Usage

Initialize the plugin in main.js, this will register the AppleLogin component globally

import { createApp } from "vue";
import App from "./App.vue";
import AppleLogin from "vue3-apple-login";

const app = createApp(App);

app.use(AppleLogin, {
  clientId: "YOUR_APPLE_CLIENT_ID",
});

app.mount("#app");
<AppleLogin height="36px" type="sign-in" :on-success="onSuccess" :on-failure="onFailure" />

Component Usage

You can also use the component directly in your Vue SFC files. This is useful if you want to customize the component or use it in a specific part of your application.

<template>
  <AppleLogin
    class="apple-btn"
    :client-config="appleConfig"
    type="sign-up"
    :on-success="onSuccess"
    :on-failure="onFailure"
  />
</template>

<script setup>
import { AppleLogin } from "vue3-apple-login";

const appleConfig = {
  clientId: "YOUR_APPLE_CLIENT_ID",
  scope: "name email",
  redirectURI: "https://example.com/callback",
  state: "login",
  nonce: "RANDOM_STRING",
  usePopup: true,
};

function onSuccess(data) {
  // Handle successful login here
  // data will contain the user information returned from Apple
  console.log("Handle the response", data);
}

function onFailure(error) {
  console.error(error);
}
</script>

<style scoped>
.apple-btn {
  width: 190px;
  height: 36px;
  cursor: pointer;
}
</style>

Custom Button

The component also provides a slot allowing you to create or use a custom Apple login button. There are icon resources available on Apple's Human Interface Guidelines.

<template>
  <AppleLogin
    class="apple-btn"
    :client-config="appleConfig"
    :on-success="onSuccess"
    :on-failure="onFailure"
  >
    <button class="custom-apple-btn">Custom Apple Login button</button>
  </AppleLogin>
</template>

Props

<AppleLogin
  class="apple-btn"
  :client-config="appleConfig"
  mode="center-align"
  type="sign-in"
  color="black"
  :border="true"
  border-radius="15"
  logo-size="medium"
  :logo-position="0"
  :label-position="0"
  width="100%"
  height="100%"
  :on-success="onSuccess"
  :on-failure="onFailure"
/>

Information about the styling props: Apple documentation

  • client-config: The configuration object for the Apple login. Configuration documentation.

  • :on-success defines a callback function to retrieve Apple user data.

  • :on-failure defines a callback if authentication fails.

The callbacks only work when the client-config usePopup is set to true.

usePopup set false will ignore the callbacks and redirect the user to the Apple login page and back to your redirectURI for server-side authentication.