react-native-music-kit-auth

0.4.0 • Public • Published

react-native-music-kit-auth

Simple module to retrieve the users' Music Kit API tokens

Installation

npm install react-native-music-kit-auth

Usage

import { type AuthStatus, requestAuthorization, getUserTokens } from 'react-native-music-kit-auth';

// ...

const authorizationStatus = await requestAuthorization();
console.log(authorizationStatus);

if (authorizationStatus === AuthStatus.Authorized) {
  const userTokens = await getUserTokens();

  console.log(userTokens.developerToken);
  console.log(userTokens.musicUserToken);
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

Readme

Keywords

Package Sidebar

Install

npm i react-native-music-kit-auth

Weekly Downloads

2

Version

0.4.0

License

MIT

Unpacked Size

21.3 kB

Total Files

20

Last publish

Collaborators

  • ganitzsh