Simple module to retrieve the users' Music Kit API tokens
npm install react-native-music-kit-auth
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);
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library