config-plugin-react-native-auth0
Version:
Expo plugin for react-native-auth0 using expo config plugins
41 lines (37 loc) • 970 B
text/typescript
import {
ConfigPlugin,
createRunOncePlugin,
withPlugins,
} from "@expo/config-plugins";
import { withBuildProperties } from "expo-build-properties";
import { withAuth0IOS } from "./withAuth0IOS";
import { withAuth0Android } from "./withAuth0Android";
const pkg = require('../../package.json');
export interface Auth0PluginProps {
/**
* Domain from Auth0
*/
auth0Domain: string;
}
const withAuth0: ConfigPlugin<Auth0PluginProps> = (config, props) => {
config = withAuth0IOS(config, props);
config = withAuth0Android(config, props);
config = withPlugins(config, [
[
withBuildProperties,
{
android: {
compileSdkVersion: 31,
targetSdkVersion: 31,
buildToolsVersion: "31.0.0",
},
ios: {
deploymentTarget: "13.0",
},
},
],
]);
// Return the modified config.
return config;
};
export default createRunOncePlugin(withAuth0, pkg.name, pkg.version);