*)options
68 | {
69 | return [RCTLinkingManager application:application openURL:url options:options];
70 | }
71 |
72 | @end
73 |
--------------------------------------------------------------------------------
/example/android/gradlew.bat:
--------------------------------------------------------------------------------
1 | @rem
2 | @rem Copyright 2015 the original author or authors.
3 | @rem
4 | @rem Licensed under the Apache License, Version 2.0 (the "License");
5 | @rem you may not use this file except in compliance with the License.
6 | @rem You may obtain a copy of the License at
7 | @rem
8 | @rem http://www.apache.org/licenses/LICENSE-2.0
9 | @rem
10 | @rem Unless required by applicable law or agreed to in writing, software
11 | @rem distributed under the License is distributed on an "AS IS" BASIS,
12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | @rem See the License for the specific language governing permissions and
14 | @rem limitations under the License.
15 | @rem
16 |
17 | @if "%DEBUG%" == "" @echo off
18 | @rem ##########################################################################
19 | @rem
20 | @rem Gradle startup script for Windows
21 | @rem
22 | @rem ##########################################################################
23 |
24 | @rem Set local scope for the variables with windows NT shell
25 | if "%OS%"=="Windows_NT" setlocal
26 |
27 | set DIRNAME=%~dp0
28 | if "%DIRNAME%" == "" set DIRNAME=.
29 | set APP_BASE_NAME=%~n0
30 | set APP_HOME=%DIRNAME%
31 |
32 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
33 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
34 |
35 | @rem Find java.exe
36 | if defined JAVA_HOME goto findJavaFromJavaHome
37 |
38 | set JAVA_EXE=java.exe
39 | %JAVA_EXE% -version >NUL 2>&1
40 | if "%ERRORLEVEL%" == "0" goto init
41 |
42 | echo.
43 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
44 | echo.
45 | echo Please set the JAVA_HOME variable in your environment to match the
46 | echo location of your Java installation.
47 |
48 | goto fail
49 |
50 | :findJavaFromJavaHome
51 | set JAVA_HOME=%JAVA_HOME:"=%
52 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
53 |
54 | if exist "%JAVA_EXE%" goto init
55 |
56 | echo.
57 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
58 | echo.
59 | echo Please set the JAVA_HOME variable in your environment to match the
60 | echo location of your Java installation.
61 |
62 | goto fail
63 |
64 | :init
65 | @rem Get command-line arguments, handling Windows variants
66 |
67 | if not "%OS%" == "Windows_NT" goto win9xME_args
68 |
69 | :win9xME_args
70 | @rem Slurp the command line arguments.
71 | set CMD_LINE_ARGS=
72 | set _SKIP=2
73 |
74 | :win9xME_args_slurp
75 | if "x%~1" == "x" goto execute
76 |
77 | set CMD_LINE_ARGS=%*
78 |
79 | :execute
80 | @rem Setup the command line
81 |
82 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
83 |
84 | @rem Execute Gradle
85 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
86 |
87 | :end
88 | @rem End local scope for the variables with windows NT shell
89 | if "%ERRORLEVEL%"=="0" goto mainEnd
90 |
91 | :fail
92 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
93 | rem the _cmd.exe /c_ return code!
94 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
95 | exit /b 1
96 |
97 | :mainEnd
98 | if "%OS%"=="Windows_NT" endlocal
99 |
100 | :omega
101 |
--------------------------------------------------------------------------------
/example/android/app/src/debug/java/com/example/reactnativekeycloak/ReactNativeFlipper.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Copyright (c) Facebook, Inc. and its affiliates.
3 | *
4 | * This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.example.reactnativekeycloak;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
21 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
22 | import com.facebook.react.ReactInstanceManager;
23 | import com.facebook.react.bridge.ReactContext;
24 | import com.facebook.react.modules.network.NetworkingModule;
25 | import okhttp3.OkHttpClient;
26 |
27 | public class ReactNativeFlipper {
28 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
29 | if (FlipperUtils.shouldEnableFlipper(context)) {
30 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
31 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
32 | client.addPlugin(new ReactFlipperPlugin());
33 | client.addPlugin(new DatabasesFlipperPlugin(context));
34 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
35 | client.addPlugin(CrashReporterPlugin.getInstance());
36 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
37 | NetworkingModule.setCustomClientBuilder(
38 | new NetworkingModule.CustomClientBuilder() {
39 | @Override
40 | public void apply(OkHttpClient.Builder builder) {
41 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
42 | }
43 | });
44 | client.addPlugin(networkFlipperPlugin);
45 | client.start();
46 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
47 | // Hence we run if after all native modules have been initialized
48 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
49 | if (reactContext == null) {
50 | reactInstanceManager.addReactInstanceEventListener(
51 | new ReactInstanceManager.ReactInstanceEventListener() {
52 | @Override
53 | public void onReactContextInitialized(ReactContext reactContext) {
54 | reactInstanceManager.removeReactInstanceEventListener(this);
55 | reactContext.runOnNativeModulesQueueThread(
56 | new Runnable() {
57 | @Override
58 | public void run() {
59 | client.addPlugin(new FrescoFlipperPlugin());
60 | }
61 | });
62 | }
63 | });
64 | } else {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | }
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/example/ios/KeycloakExample/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
21 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/example/ios/KeycloakExample.xcodeproj/xcshareddata/xcschemes/KeycloakExample.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
51 |
52 |
53 |
54 |
64 |
66 |
72 |
73 |
74 |
75 |
81 |
83 |
89 |
90 |
91 |
92 |
94 |
95 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@react-keycloak/native",
3 | "version": "0.6.4",
4 | "license": "MIT",
5 | "description": "React Native component for Keycloak javascript adapter",
6 | "repository": "https://github.com/react-keycloak/react-native-keycloak",
7 | "author": "IronTony (https://github.com/IronTony)",
8 | "bugs": {
9 | "url": "https://github.com/react-keycloak/react-native-keycloak/issues"
10 | },
11 | "homepage": "https://github.com/react-keycloak/react-native-keycloak#readme",
12 | "keywords": [
13 | "react",
14 | "react-native",
15 | "ios",
16 | "android",
17 | "keycloak",
18 | "keycloak-js"
19 | ],
20 | "publishConfig": {
21 | "access": "public"
22 | },
23 | "main": "lib/commonjs/index",
24 | "module": "lib/module/index",
25 | "types": "lib/typescript/src/index.d.ts",
26 | "react-native": "src/index",
27 | "source": "src/index",
28 | "files": [
29 | "src",
30 | "lib",
31 | "android",
32 | "ios",
33 | "cpp",
34 | "react-native-keycloak.podspec",
35 | "!lib/typescript/example",
36 | "!**/__tests__",
37 | "!**/__fixtures__",
38 | "!**/__mocks__"
39 | ],
40 | "scripts": {
41 | "test": "jest",
42 | "typescript": "tsc --noEmit",
43 | "lint": "eslint \"**/*.{js,ts,tsx}\"",
44 | "prepare": "bob build",
45 | "release": "release-it",
46 | "example": "yarn --cwd example",
47 | "pods": "cd example && pod-install --quiet",
48 | "bootstrap": "yarn example && yarn && yarn pods"
49 | },
50 | "dependencies": {
51 | "@react-keycloak/core": "^3.2.0",
52 | "@react-keycloak/keycloak-ts": "^0.2.4",
53 | "react-native-inappbrowser-reborn": "^3.7.0"
54 | },
55 | "peerDependencies": {
56 | "react": "*",
57 | "react-native": "*"
58 | },
59 | "devDependencies": {
60 | "@commitlint/config-conventional": "^8.3.4",
61 | "@react-native-community/bob": "^0.16.2",
62 | "@react-native-community/eslint-config": "^2.0.0",
63 | "@release-it/conventional-changelog": "4.2.0",
64 | "@types/base64-js": "^1.3.0",
65 | "@types/jest": "^26.0.0",
66 | "@types/jwt-decode": "^2.2.1",
67 | "@types/react": "^16.9.19",
68 | "@types/react-native": "0.62.13",
69 | "commitlint": "^8.3.5",
70 | "eslint": "^7.2.0",
71 | "eslint-config-prettier": "^6.11.0",
72 | "eslint-plugin-prettier": "^3.1.3",
73 | "husky": "^4.2.5",
74 | "jest": "^26.0.1",
75 | "pod-install": "^0.1.0",
76 | "prettier": "^2.0.5",
77 | "react": "16.11.0",
78 | "react-native": "0.62.2",
79 | "release-it": "14.12.5",
80 | "typescript": "^3.8.3"
81 | },
82 | "jest": {
83 | "preset": "react-native",
84 | "modulePathIgnorePatterns": [
85 | "/example/node_modules",
86 | "/lib/"
87 | ]
88 | },
89 | "husky": {
90 | "hooks": {
91 | "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
92 | "pre-commit": "yarn lint && yarn typescript"
93 | }
94 | },
95 | "commitlint": {
96 | "extends": [
97 | "@commitlint/config-conventional"
98 | ]
99 | },
100 | "release-it": {
101 | "git": {
102 | "commitMessage": "chore: release ${version}",
103 | "tagName": "v${version}"
104 | },
105 | "npm": {
106 | "publish": true
107 | },
108 | "github": {
109 | "release": true
110 | },
111 | "plugins": {
112 | "@release-it/conventional-changelog": {
113 | "preset": "angular"
114 | }
115 | }
116 | },
117 | "eslintConfig": {
118 | "extends": [
119 | "@react-native-community",
120 | "prettier"
121 | ],
122 | "rules": {
123 | "prettier/prettier": [
124 | "error",
125 | {
126 | "quoteProps": "consistent",
127 | "singleQuote": true,
128 | "tabWidth": 2,
129 | "trailingComma": "es5",
130 | "useTabs": false
131 | }
132 | ]
133 | }
134 | },
135 | "eslintIgnore": [
136 | "node_modules/",
137 | "lib/"
138 | ],
139 | "prettier": {
140 | "quoteProps": "consistent",
141 | "singleQuote": true,
142 | "tabWidth": 2,
143 | "trailingComma": "es5",
144 | "useTabs": false
145 | },
146 | "@react-native-community/bob": {
147 | "source": "src",
148 | "output": "lib",
149 | "targets": [
150 | "commonjs",
151 | "module",
152 | "typescript"
153 | ]
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/example/ios/Podfile:
--------------------------------------------------------------------------------
1 | platform :ios, '10.0'
2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
3 |
4 | # fixes for last Mac updates
5 | def find_and_replace(dir, findstr, replacestr)
6 | Dir[dir].each do |name|
7 | text = File.read(name)
8 | replace = text.gsub(findstr,replacestr)
9 | if text != replace
10 | puts "Fix: " + name
11 | File.open(name, "w") { |file| file.puts replace }
12 | STDOUT.flush
13 | end
14 | end
15 | Dir[dir + '*/'].each(&method(:find_and_replace))
16 | end
17 |
18 | def add_flipper_pods!
19 | version = '~> 0.74.0'
20 | # version['Flipper-Folly'] ||= '~> 2.5.3'
21 | pod 'FlipperKit', version, :configuration => 'Debug'
22 | pod 'FlipperKit/FlipperKitLayoutPlugin', version, :configuration => 'Debug'
23 | pod 'FlipperKit/SKIOSNetworkPlugin', version, :configuration => 'Debug'
24 | pod 'FlipperKit/FlipperKitUserDefaultsPlugin', version, :configuration => 'Debug'
25 | pod 'FlipperKit/FlipperKitReactPlugin', version, :configuration => 'Debug'
26 | pod 'Flipper-Folly', '~> 2.5.3', :configuration => 'Debug'
27 | pod 'Flipper-DoubleConversion', '~> 1.1.7', :configuration => 'Debug'
28 | end
29 |
30 | # Post Install processing for Flipper
31 | def flipper_post_install(installer)
32 | installer.pods_project.targets.each do |target|
33 | if target.name == 'YogaKit'
34 | target.build_configurations.each do |config|
35 | config.build_settings['SWIFT_VERSION'] = '4.1'
36 | end
37 | end
38 | end
39 | end
40 |
41 | target 'KeycloakExample' do
42 | # Pods for KeycloakExample
43 | pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
44 | pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
45 | pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
46 | pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
47 | pod 'React', :path => '../node_modules/react-native/'
48 | pod 'React-Core', :path => '../node_modules/react-native/'
49 | pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
50 | pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
51 | pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
52 | pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
53 | pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
54 | pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
55 | pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
56 | pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
57 | pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
58 | pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
59 | pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
60 | pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
61 |
62 | pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
63 | pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
64 | pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
65 | pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
66 | pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
67 | pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
68 | pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
69 |
70 | pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
71 | pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
72 | pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
73 |
74 |
75 | use_native_modules!
76 |
77 | # Enables Flipper.
78 | #
79 | # Note that if you have use_frameworks! enabled, Flipper will not work and
80 | # you should disable these next few lines.
81 | add_flipper_pods!
82 | post_install do |installer|
83 | flipper_post_install(installer)
84 |
85 | ## Fix for XCode 12.5 & RN 0.62.2 - See https://github.com/facebook/react-native/issues/28405
86 | find_and_replace("../node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm",
87 | "_initializeModules:(NSArray> *)modules", "_initializeModules:(NSArray *)modules")
88 |
89 | find_and_replace("../node_modules/react-native/ReactCommon/turbomodule/core/platform/ios/RCTTurboModuleManager.mm",
90 | "RCTBridgeModuleNameForClass(strongModule))", "RCTBridgeModuleNameForClass(Class(strongModule)))")
91 |
92 | find_and_replace("Pods/Headers/Private/RCT-Folly/folly/synchronization/DistributedMutex-inl.h",
93 | "atomic_notify_one(state)", "folly::atomic_notify_one(state)")
94 |
95 | find_and_replace("Pods/Flipper-Folly/folly/synchronization/DistributedMutex-inl.h",
96 | "atomic_wait_until(&state, previous | data, deadline)", "folly::atomic_wait_until(&state, previous | data, deadline)")
97 |
98 | # To fix Facebook cocoapods 'sharedApplication' is unavailable: not available on iOS (App Extension)
99 | installer.pods_project.targets.each do |target|
100 | target.build_configurations.each do |config|
101 | config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'No'
102 | end
103 | end
104 |
105 |
106 | end
107 | end
108 |
--------------------------------------------------------------------------------
/src/keycloak/adapter.ts:
--------------------------------------------------------------------------------
1 | import type {
2 | CallbackStorage,
3 | FetchTokenResponse,
4 | KeycloakAdapter,
5 | KeycloakConfig,
6 | KeycloakInstance,
7 | KeycloakJSON,
8 | KeycloakLoginOptions,
9 | KeycloakLogoutOptions,
10 | KeycloakProfile,
11 | KeycloakRegisterOptions,
12 | OIDCProviderConfig,
13 | } from '@react-keycloak/keycloak-ts';
14 | import InAppBrowser from 'react-native-inappbrowser-reborn';
15 |
16 | import LocalStorage from './storage';
17 | import type { RNKeycloakInitOptions } from './types';
18 | import { fetchJSON } from './utils';
19 |
20 | class RNAdapter implements KeycloakAdapter {
21 | private readonly client: Readonly;
22 |
23 | private readonly initOptions: Readonly;
24 |
25 | constructor(
26 | client: Readonly,
27 | _keycloakConfig: Readonly,
28 | initOptions: Readonly
29 | ) {
30 | this.client = client;
31 | this.initOptions = initOptions;
32 | }
33 |
34 | createCallbackStorage(): CallbackStorage {
35 | return new LocalStorage();
36 | }
37 |
38 | /**
39 | * Start login process
40 | *
41 | * @param {KeycloakLoginOptions} options Login options
42 | */
43 | async login(options?: KeycloakLoginOptions): Promise {
44 | const loginUrl = this.client.createLoginUrl(options);
45 |
46 | if (await InAppBrowser.isAvailable()) {
47 | // See for more details https://github.com/proyecto26/react-native-inappbrowser#authentication-flow-using-deep-linking
48 | const res = await InAppBrowser.openAuth(
49 | loginUrl,
50 | this.client.redirectUri!,
51 | this.initOptions.inAppBrowserOptions
52 | );
53 |
54 | if (res.type === 'success' && res.url) {
55 | const oauth = this.client.parseCallback(res.url);
56 | return this.client.processCallback(oauth);
57 | }
58 |
59 | if (res.type === 'cancel') {
60 | throw new Error('User has closed the browser');
61 | }
62 |
63 | throw new Error('Authentication flow failed');
64 | } else {
65 | throw new Error('InAppBrowser not available');
66 | // TODO: maybe!
67 | // Linking.openURL(loginURL);
68 | }
69 | }
70 |
71 | async logout(options?: KeycloakLogoutOptions): Promise {
72 | const logoutUrl = this.client.createLogoutUrl(options);
73 |
74 | if (await InAppBrowser.isAvailable()) {
75 | // See for more details https://github.com/proyecto26/react-native-inappbrowser#authentication-flow-using-deep-linking
76 | const res = await InAppBrowser.openAuth(
77 | logoutUrl,
78 | this.client.redirectUri!,
79 | this.initOptions.inAppBrowserOptions
80 | );
81 |
82 | if (res.type === 'success') {
83 | return this.client.clearToken();
84 | }
85 |
86 | throw new Error('Logout flow failed');
87 | } else {
88 | throw new Error('InAppBrowser not available');
89 | // TODO: maybe!
90 | // Linking.openURL(logoutUrl);
91 | }
92 | }
93 |
94 | async register(options?: KeycloakRegisterOptions) {
95 | const registerUrl = this.client.createRegisterUrl(options);
96 |
97 | if (await InAppBrowser.isAvailable()) {
98 | // See for more details https://github.com/proyecto26/react-native-inappbrowser#authentication-flow-using-deep-linking
99 | const res = await InAppBrowser.openAuth(
100 | registerUrl,
101 | this.client.redirectUri!,
102 | this.initOptions.inAppBrowserOptions
103 | );
104 |
105 | if (res.type === 'success' && res.url) {
106 | const oauth = this.client.parseCallback(res.url);
107 | return this.client.processCallback(oauth);
108 | }
109 |
110 | throw new Error('Registration flow failed');
111 | } else {
112 | throw new Error('InAppBrowser not available');
113 | // TODO: maybe!
114 | // Linking.openURL(registerUrl);
115 | }
116 | }
117 |
118 | async accountManagement() {
119 | const accountUrl = this.client.createAccountUrl();
120 |
121 | if (typeof accountUrl !== 'undefined') {
122 | await InAppBrowser.open(accountUrl, this.initOptions.inAppBrowserOptions);
123 | } else {
124 | throw 'Not supported by the OIDC server';
125 | }
126 | }
127 |
128 | async fetchKeycloakConfigJSON(configUrl: string): Promise {
129 | return await fetchJSON(configUrl);
130 | }
131 |
132 | async fetchOIDCProviderConfigJSON(
133 | oidcProviderConfigUrl: string
134 | ): Promise {
135 | return await fetchJSON(oidcProviderConfigUrl);
136 | }
137 |
138 | async fetchTokens(
139 | tokenUrl: string,
140 | params: string
141 | ): Promise {
142 | const tokenRes = await fetch(tokenUrl, {
143 | method: 'POST',
144 | headers: {
145 | 'Content-type': 'application/x-www-form-urlencoded',
146 | },
147 | body: params,
148 | });
149 |
150 | if (!tokenRes.ok) throw new Error('fetchTokens failed');
151 | return (await tokenRes.json()) as FetchTokenResponse;
152 | }
153 |
154 | async refreshTokens(
155 | tokenUrl: string,
156 | params: string
157 | ): Promise {
158 | const tokenRes = await fetch(tokenUrl, {
159 | method: 'POST',
160 | headers: {
161 | 'Content-type': 'application/x-www-form-urlencoded',
162 | },
163 | body: params,
164 | });
165 |
166 | if (!tokenRes.ok) throw new Error('refreshTokens failed');
167 | return (await tokenRes.json()) as FetchTokenResponse;
168 | }
169 |
170 | async fetchUserProfile(
171 | profileUrl: string,
172 | token: string
173 | ): Promise {
174 | return await fetchJSON(profileUrl, token);
175 | }
176 |
177 | async fetchUserInfo(userInfoUrl: string, token: string): Promise {
178 | return await fetchJSON(userInfoUrl, token);
179 | }
180 |
181 | redirectUri(options?: { redirectUri?: string }): string {
182 | if (options && options.redirectUri) {
183 | return options.redirectUri;
184 | }
185 |
186 | if (this.client.redirectUri) {
187 | return this.client.redirectUri;
188 | }
189 |
190 | return ''; // TODO: Retrieve app deeplink
191 | }
192 | }
193 |
194 | export default RNAdapter;
195 |
--------------------------------------------------------------------------------
/example/android/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | #
4 | # Copyright 2015 the original author or authors.
5 | #
6 | # Licensed under the Apache License, Version 2.0 (the "License");
7 | # you may not use this file except in compliance with the License.
8 | # You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing, software
13 | # distributed under the License is distributed on an "AS IS" BASIS,
14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | # See the License for the specific language governing permissions and
16 | # limitations under the License.
17 | #
18 |
19 | ##############################################################################
20 | ##
21 | ## Gradle start up script for UN*X
22 | ##
23 | ##############################################################################
24 |
25 | # Attempt to set APP_HOME
26 | # Resolve links: $0 may be a link
27 | PRG="$0"
28 | # Need this for relative symlinks.
29 | while [ -h "$PRG" ] ; do
30 | ls=`ls -ld "$PRG"`
31 | link=`expr "$ls" : '.*-> \(.*\)$'`
32 | if expr "$link" : '/.*' > /dev/null; then
33 | PRG="$link"
34 | else
35 | PRG=`dirname "$PRG"`"/$link"
36 | fi
37 | done
38 | SAVED="`pwd`"
39 | cd "`dirname \"$PRG\"`/" >/dev/null
40 | APP_HOME="`pwd -P`"
41 | cd "$SAVED" >/dev/null
42 |
43 | APP_NAME="Gradle"
44 | APP_BASE_NAME=`basename "$0"`
45 |
46 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48 |
49 | # Use the maximum available, or set MAX_FD != -1 to use that value.
50 | MAX_FD="maximum"
51 |
52 | warn () {
53 | echo "$*"
54 | }
55 |
56 | die () {
57 | echo
58 | echo "$*"
59 | echo
60 | exit 1
61 | }
62 |
63 | # OS specific support (must be 'true' or 'false').
64 | cygwin=false
65 | msys=false
66 | darwin=false
67 | nonstop=false
68 | case "`uname`" in
69 | CYGWIN* )
70 | cygwin=true
71 | ;;
72 | Darwin* )
73 | darwin=true
74 | ;;
75 | MINGW* )
76 | msys=true
77 | ;;
78 | NONSTOP* )
79 | nonstop=true
80 | ;;
81 | esac
82 |
83 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84 |
85 | # Determine the Java command to use to start the JVM.
86 | if [ -n "$JAVA_HOME" ] ; then
87 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
88 | # IBM's JDK on AIX uses strange locations for the executables
89 | JAVACMD="$JAVA_HOME/jre/sh/java"
90 | else
91 | JAVACMD="$JAVA_HOME/bin/java"
92 | fi
93 | if [ ! -x "$JAVACMD" ] ; then
94 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
95 |
96 | Please set the JAVA_HOME variable in your environment to match the
97 | location of your Java installation."
98 | fi
99 | else
100 | JAVACMD="java"
101 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
102 |
103 | Please set the JAVA_HOME variable in your environment to match the
104 | location of your Java installation."
105 | fi
106 |
107 | # Increase the maximum file descriptors if we can.
108 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
109 | MAX_FD_LIMIT=`ulimit -H -n`
110 | if [ $? -eq 0 ] ; then
111 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
112 | MAX_FD="$MAX_FD_LIMIT"
113 | fi
114 | ulimit -n $MAX_FD
115 | if [ $? -ne 0 ] ; then
116 | warn "Could not set maximum file descriptor limit: $MAX_FD"
117 | fi
118 | else
119 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
120 | fi
121 | fi
122 |
123 | # For Darwin, add options to specify how the application appears in the dock
124 | if $darwin; then
125 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
126 | fi
127 |
128 | # For Cygwin, switch paths to Windows format before running java
129 | if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
132 | JAVACMD=`cygpath --unix "$JAVACMD"`
133 |
134 | # We build the pattern for arguments to be converted via cygpath
135 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
136 | SEP=""
137 | for dir in $ROOTDIRSRAW ; do
138 | ROOTDIRS="$ROOTDIRS$SEP$dir"
139 | SEP="|"
140 | done
141 | OURCYGPATTERN="(^($ROOTDIRS))"
142 | # Add a user-defined pattern to the cygpath arguments
143 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
144 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
145 | fi
146 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
147 | i=0
148 | for arg in "$@" ; do
149 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
150 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
151 |
152 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
153 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
154 | else
155 | eval `echo args$i`="\"$arg\""
156 | fi
157 | i=$((i+1))
158 | done
159 | case $i in
160 | (0) set -- ;;
161 | (1) set -- "$args0" ;;
162 | (2) set -- "$args0" "$args1" ;;
163 | (3) set -- "$args0" "$args1" "$args2" ;;
164 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
165 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
166 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
167 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
168 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
169 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
170 | esac
171 | fi
172 |
173 | # Escape application args
174 | save () {
175 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
176 | echo " "
177 | }
178 | APP_ARGS=$(save "$@")
179 |
180 | # Collect all arguments for the java command, following the shell quoting and substitution rules
181 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
182 |
183 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
184 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
185 | cd "$(dirname "$0")"
186 | fi
187 |
188 | exec "$JAVACMD" "$@"
189 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project.
4 |
5 | ## Development workflow
6 |
7 | To get started with the project, run `yarn bootstrap` in the root directory to install the required dependencies for each package:
8 |
9 | ```sh
10 | yarn bootstrap
11 | ```
12 |
13 | While developing, you can run the [example app](/example/) to test your changes.
14 |
15 | To start the packager:
16 |
17 | ```sh
18 | yarn example start
19 | ```
20 |
21 | To run the example app on Android:
22 |
23 | ```sh
24 | yarn example android
25 | ```
26 |
27 | To run the example app on iOS:
28 |
29 | ```sh
30 | yarn example ios
31 | ```
32 |
33 | Make sure your code passes TypeScript and ESLint. Run the following to verify:
34 |
35 | ```sh
36 | yarn typescript
37 | yarn lint
38 | ```
39 |
40 | To fix formatting errors, run the following:
41 |
42 | ```sh
43 | yarn lint --fix
44 | ```
45 |
46 | Remember to add tests for your change if possible. Run the unit tests by:
47 |
48 | ```sh
49 | yarn test
50 | ```
51 |
52 | To edit the Objective-C files, open `example/ios/KeycloakExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-keycloak`.
53 |
54 | To edit the Kotlin files, open `example/android` in Android studio and find the source files at `reactnativekeycloak` under `Android`.
55 |
56 | ### Commit message convention
57 |
58 | We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages:
59 |
60 | - `fix`: bug fixes, e.g. fix crash due to deprecated method.
61 | - `feat`: new features, e.g. add new method to the module.
62 | - `refactor`: code refactor, e.g. migrate from class components to hooks.
63 | - `docs`: changes into documentation, e.g. add usage example for the module..
64 | - `test`: adding or updating tests, eg add integration tests using detox.
65 | - `chore`: tooling changes, e.g. change CI config.
66 |
67 | Our pre-commit hooks verify that your commit message matches this format when committing.
68 |
69 | ### Linting and tests
70 |
71 | [ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/)
72 |
73 | We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing.
74 |
75 | Our pre-commit hooks verify that the linter and tests pass when committing.
76 |
77 | ### Scripts
78 |
79 | The `package.json` file contains various scripts for common tasks:
80 |
81 | - `yarn bootstrap`: setup project by installing all dependencies and pods.
82 | - `yarn typescript`: type-check files with TypeScript.
83 | - `yarn lint`: lint files with ESLint.
84 | - `yarn test`: run unit tests with Jest.
85 | - `yarn example start`: start the Metro server for the example app.
86 | - `yarn example android`: run the example app on Android.
87 | - `yarn example ios`: run the example app on iOS.
88 |
89 | ### Sending a pull request
90 |
91 | > **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
92 |
93 | When you're sending a pull request:
94 |
95 | - Prefer small pull requests focused on one change.
96 | - Verify that linters and tests are passing.
97 | - Review the documentation to make sure it looks good.
98 | - Follow the pull request template when opening a pull request.
99 | - For pull requests that change the API or implementation, discuss with maintainers first by opening an issue.
100 |
101 | ## Code of Conduct
102 |
103 | ### Our Pledge
104 |
105 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
106 |
107 | We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
108 |
109 | ### Our Standards
110 |
111 | Examples of behavior that contributes to a positive environment for our community include:
112 |
113 | - Demonstrating empathy and kindness toward other people
114 | - Being respectful of differing opinions, viewpoints, and experiences
115 | - Giving and gracefully accepting constructive feedback
116 | - Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
117 | - Focusing on what is best not just for us as individuals, but for the overall community
118 |
119 | Examples of unacceptable behavior include:
120 |
121 | - The use of sexualized language or imagery, and sexual attention or
122 | advances of any kind
123 | - Trolling, insulting or derogatory comments, and personal or political attacks
124 | - Public or private harassment
125 | - Publishing others' private information, such as a physical or email
126 | address, without their explicit permission
127 | - Other conduct which could reasonably be considered inappropriate in a
128 | professional setting
129 |
130 | ### Enforcement Responsibilities
131 |
132 | Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
133 |
134 | Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
135 |
136 | ### Scope
137 |
138 | This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
139 |
140 | ### Enforcement
141 |
142 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly.
143 |
144 | All community leaders are obligated to respect the privacy and security of the reporter of any incident.
145 |
146 | ### Enforcement Guidelines
147 |
148 | Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
149 |
150 | #### 1. Correction
151 |
152 | **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
153 |
154 | **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
155 |
156 | #### 2. Warning
157 |
158 | **Community Impact**: A violation through a single incident or series of actions.
159 |
160 | **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
161 |
162 | #### 3. Temporary Ban
163 |
164 | **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
165 |
166 | **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
167 |
168 | #### 4. Permanent Ban
169 |
170 | **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
171 |
172 | **Consequence**: A permanent ban from any sort of public interaction within the community.
173 |
174 | ### Attribution
175 |
176 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
177 | available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
178 |
179 | Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
180 |
181 | [homepage]: https://www.contributor-covenant.org
182 |
183 | For answers to common questions about this code of conduct, see the FAQ at
184 | https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
185 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # React Native Keycloak
4 |
5 | > React Native component for [Keycloak](https://www.keycloak.org/)
6 |
7 | [](https://www.npmjs.com/package/@react-keycloak/native)
8 |
9 | [](https://github.com/react-keycloak/react-native-keycloak/blob/master/LICENSE)
10 | [](https://github.com/react-keycloak/react-native-keycloak/issues)
11 |
12 | [](https://gitter.im/react-keycloak/community)
13 |
14 | ---
15 |
16 | ## Table of Contents
17 |
18 | - [Install](#install)
19 | - [Setup Deep links (iOS)](#setup-deep-links-ios)
20 | - [Setup Deep links (Android)](#setup-deep-links-android)
21 | - [Getting Started](#getting-started)
22 | - [Setup RNKeycloak instance](#setup-rnkeycloak-instance)
23 | - [Setup ReactNativeKeycloakProvider](#setup-reactnativekeycloakprovider)
24 | - [Hook Usage](#hook-usage)
25 | - [External Usage (Advanced)](#external-usage-advanced)
26 | - [Examples](#examples)
27 | - [Contributing](#contributing)
28 | - [License](#license)
29 |
30 | ---
31 |
32 | ## Install
33 |
34 | ```sh
35 | yarn add @react-keycloak/native
36 | yarn add react-native-inappbrowser-reborn
37 | ```
38 |
39 | or
40 |
41 | ```sh
42 | npm install @react-keycloak/native
43 | npm install react-native-inappbrowser-reborn --save
44 | ```
45 |
46 | You have to link `react-native-inappbrowser-reborn`.
47 | For more information about how to link it go to [Official repo on github](https://github.com/proyecto26/react-native-inappbrowser)
48 |
49 | ### Setup Deep links (iOS)
50 |
51 | To navigate back from webview to you app, you have to configure deep linking.
52 |
53 | 
54 |
55 | And in `AppDelegate.m`, add these lines:
56 |
57 | ```
58 | #import
59 |
60 | ......
61 | ......
62 |
63 | // Deep linking
64 | - (BOOL)application:(UIApplication *)application
65 | openURL:(NSURL *)url
66 | options:(NSDictionary *)options
67 | {
68 | return [RCTLinkingManager application:application openURL:url options:options];
69 | }
70 | ```
71 |
72 | N.B.: replace `myapp` with the name of your app
73 |
74 | ### Setup Deep links (Android)
75 |
76 | To configure the external linking in Android, you can create a new intent in the manifest.
77 |
78 | The easiest way to do this is with the `uri-scheme` package: `npx uri-scheme add myapp --android`
79 |
80 | If you want to add it manually, open up `YourApp/android/app/src/main/AndroidManifest.xml`, and make the following adjustments:
81 |
82 | 1. Set `launchMode` of `MainActivity` to `singleTask` in order to receive intent on existing `MainActivity` (this is the default on all new projects, so you may not need to actually change anything!). It is useful if you want to perform navigation using deep link you have been registered - [details](http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters)
83 | 2. Add the new intent-filter inside the MainActivity entry with a VIEW type action:
84 |
85 | ```
86 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 | ```
101 |
102 | N.B.: replace `myapp` with the name of your app
103 |
104 | ## Getting Started
105 |
106 | ### Setup RNKeycloak instance
107 |
108 | Create a `keycloak.ts` file in the `src` folder of your project (where `App.ts` is located) with the following content
109 |
110 | ```ts
111 | import { RNKeycloak } from '@react-keycloak/native';
112 |
113 | // Setup Keycloak instance as needed
114 | // Pass initialization options as required
115 | const keycloak = new RNKeycloak({
116 | url: 'http://keycloak-server/auth',
117 | realm: 'kc-realm',
118 | clientId: 'web',
119 | });
120 |
121 | export default keycloak;
122 | ```
123 |
124 | ### Setup ReactNativeKeycloakProvider
125 |
126 | Wrap your App inside `KeycloakProvider` and pass the `keycloak` instance as prop
127 |
128 | ```tsx
129 | import { ReactNativeKeycloakProvider } from '@react-keycloak/native';
130 |
131 | import keycloak from './keycloak';
132 |
133 | // Wrap everything inside ReactNativeKeycloakProvider
134 | const App = () => (
135 |
146 |
147 |
148 | );
149 |
150 | export default App;
151 | ```
152 |
153 | **N.B.** If your using other providers (such as `react-redux`) it is recommended to place them inside `ReactNativeKeycloakProvider`.
154 |
155 | `ReactNativeKeycloakProvider` automatically invokes `keycloak.init()` method when needed and supports the following props:
156 |
157 | - `initConfig`, contains the object to be passed to `keycloak.init()` method, by default the following is used
158 |
159 | {
160 | onLoad: 'check-sso',
161 | }
162 |
163 | for more options see [Keycloak docs](https://www.keycloak.org/docs/latest/securing_apps/index.html#init-options).
164 |
165 | - `LoadingComponent`, a component to be displayed while `keycloak` is being initialized, if not provided child components will be rendered immediately. Defaults to `null`
166 |
167 | - `isLoadingCheck`, an optional loading check function to customize LoadingComponent display condition. Return `true` to display LoadingComponent, `false` to hide it.
168 |
169 | Can be implemented as follow
170 |
171 | ```ts
172 | (keycloak) => !keycloak.authenticated;
173 | ```
174 |
175 | - `onEvent`, an handler function that receives events launched by `keycloak`, defaults to `null`.
176 |
177 | It can be implemented as follow
178 |
179 | ```ts
180 | (event, error) => {
181 | console.log('onKeycloakEvent', event, error);
182 | };
183 | ```
184 |
185 | Published events are:
186 |
187 | - `onReady`
188 | - `onInitError`
189 | - `onAuthSuccess`
190 | - `onAuthError`
191 | - `onAuthRefreshSuccess`
192 | - `onAuthRefreshError`
193 | - `onTokenExpired`
194 | - `onAuthLogout`
195 |
196 | - `onTokens`, an handler function that receives `keycloak` tokens as an object every time they change, defaults to `null`.
197 |
198 | Keycloak tokens are returned as follow
199 |
200 | ```json
201 | {
202 | "idToken": string,
203 | "refreshToken": string,
204 | "token": string
205 | }
206 | ```
207 |
208 | ### Hook Usage
209 |
210 | When a component requires access to `Keycloak`, you can use the `useKeycloak` Hook.
211 |
212 | ```tsx
213 | import { useKeycloak } from '@react-keycloak/native';
214 |
215 | export default () => {
216 | // Using array destructuring
217 | const [keycloak, initialized] = useKeycloak();
218 | // or Object destructuring
219 | const { keycloak, initialized } = useKeycloak();
220 |
221 | // Here you can access all of keycloak methods and variables.
222 | // See https://www.keycloak.org/docs/latest/securing_apps/index.html#javascript-adapter-reference
223 |
224 | return (
225 |
226 |
227 | {`User is ${!keycloak.authenticated ? 'NOT ' : ''}authenticated`}
228 |
229 |
230 | {!!keycloak.authenticated && (
231 |
234 | );
235 | };
236 | ```
237 |
238 | ### External Usage (Advanced)
239 |
240 | If you need to access `keycloak` instance from non-`React` files (such as `sagas`, `utils`, `providers` ...), you can import the instance directly from the `keycloak.ts` file.
241 |
242 | The instance will be initialized by `react-keycloak` but you'll need to be carefull when using the instance and avoid setting/overriding any props, you can however freely access the exposed methods (such as `refreshToken`, `login`, etc...).
243 |
244 | ## Examples
245 |
246 | See inside `example` folder for a demo app showcasing the main features.
247 |
248 | ## Contributing
249 |
250 | See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
251 |
252 | ## License
253 |
254 | MIT
255 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "com.android.application"
2 |
3 | import com.android.build.OutputFile
4 |
5 | /**
6 | * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
7 | * and bundleReleaseJsAndAssets).
8 | * These basically call `react-native bundle` with the correct arguments during the Android build
9 | * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
10 | * bundle directly from the development server. Below you can see all the possible configurations
11 | * and their defaults. If you decide to add a configuration block, make sure to add it before the
12 | * `apply from: "../../node_modules/react-native/react.gradle"` line.
13 | *
14 | * project.ext.react = [
15 | * // the name of the generated asset file containing your JS bundle
16 | * bundleAssetName: "index.android.bundle",
17 | *
18 | * // the entry file for bundle generation
19 | * entryFile: "index.android.js",
20 | *
21 | * // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
22 | * bundleCommand: "ram-bundle",
23 | *
24 | * // whether to bundle JS and assets in debug mode
25 | * bundleInDebug: false,
26 | *
27 | * // whether to bundle JS and assets in release mode
28 | * bundleInRelease: true,
29 | *
30 | * // whether to bundle JS and assets in another build variant (if configured).
31 | * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
32 | * // The configuration property can be in the following formats
33 | * // 'bundleIn${productFlavor}${buildType}'
34 | * // 'bundleIn${buildType}'
35 | * // bundleInFreeDebug: true,
36 | * // bundleInPaidRelease: true,
37 | * // bundleInBeta: true,
38 | *
39 | * // whether to disable dev mode in custom build variants (by default only disabled in release)
40 | * // for KeycloakExample: to disable dev mode in the staging build type (if configured)
41 | * devDisabledInStaging: true,
42 | * // The configuration property can be in the following formats
43 | * // 'devDisabledIn${productFlavor}${buildType}'
44 | * // 'devDisabledIn${buildType}'
45 | *
46 | * // the root of your project, i.e. where "package.json" lives
47 | * root: "../../",
48 | *
49 | * // where to put the JS bundle asset in debug mode
50 | * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
51 | *
52 | * // where to put the JS bundle asset in release mode
53 | * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
54 | *
55 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
56 | * // require('./image.png')), in debug mode
57 | * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
58 | *
59 | * // where to put drawable resources / React Native assets, e.g. the ones you use via
60 | * // require('./image.png')), in release mode
61 | * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
62 | *
63 | * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
64 | * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
65 | * // date; if you have any other folders that you want to ignore for performance reasons (gradle
66 | * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
67 | * // for KeycloakExample, you might want to remove it from here.
68 | * inputExcludes: ["android/**", "ios/**"],
69 | *
70 | * // override which node gets called and with what additional arguments
71 | * nodeExecutableAndArgs: ["node"],
72 | *
73 | * // supply additional arguments to the packager
74 | * extraPackagerArgs: []
75 | * ]
76 | */
77 |
78 | project.ext.react = [
79 | enableHermes: false, // clean and rebuild if changing
80 | ]
81 |
82 | apply from: "../../node_modules/react-native/react.gradle"
83 |
84 | /**
85 | * Set this to true to create two separate APKs instead of one:
86 | * - An APK that only works on ARM devices
87 | * - An APK that only works on x86 devices
88 | * The advantage is the size of the APK is reduced by about 4MB.
89 | * Upload all the APKs to the Play Store and people will download
90 | * the correct one based on the CPU architecture of their device.
91 | */
92 | def enableSeparateBuildPerCPUArchitecture = false
93 |
94 | /**
95 | * Run Proguard to shrink the Java bytecode in release builds.
96 | */
97 | def enableProguardInReleaseBuilds = false
98 |
99 | /**
100 | * The preferred build flavor of JavaScriptCore.
101 | *
102 | * For KeycloakExample, to use the international variant, you can use:
103 | * `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
104 | *
105 | * The international variant includes ICU i18n library and necessary data
106 | * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
107 | * give correct results when using with locales other than en-US. Note that
108 | * this variant is about 6MiB larger per architecture than default.
109 | */
110 | def jscFlavor = 'org.webkit:android-jsc:+'
111 |
112 | /**
113 | * Whether to enable the Hermes VM.
114 | *
115 | * This should be set on project.ext.react and mirrored here. If it is not set
116 | * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
117 | * and the benefits of using Hermes will therefore be sharply reduced.
118 | */
119 | def enableHermes = project.ext.react.get("enableHermes", false);
120 |
121 | android {
122 | compileSdkVersion rootProject.ext.compileSdkVersion
123 |
124 | compileOptions {
125 | sourceCompatibility JavaVersion.VERSION_1_8
126 | targetCompatibility JavaVersion.VERSION_1_8
127 | }
128 |
129 | defaultConfig {
130 | applicationId "com.example.reactnativekeycloak"
131 | minSdkVersion rootProject.ext.minSdkVersion
132 | targetSdkVersion rootProject.ext.targetSdkVersion
133 | versionCode 1
134 | versionName "1.0"
135 | }
136 | splits {
137 | abi {
138 | reset()
139 | enable enableSeparateBuildPerCPUArchitecture
140 | universalApk false // If true, also generate a universal APK
141 | include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
142 | }
143 | }
144 | signingConfigs {
145 | debug {
146 | storeFile file('debug.keystore')
147 | storePassword 'android'
148 | keyAlias 'androiddebugkey'
149 | keyPassword 'android'
150 | }
151 | }
152 | buildTypes {
153 | debug {
154 | signingConfig signingConfigs.debug
155 | }
156 | release {
157 | // Caution! In production, you need to generate your own keystore file.
158 | // see https://facebook.github.io/react-native/docs/signed-apk-android.
159 | signingConfig signingConfigs.debug
160 | minifyEnabled enableProguardInReleaseBuilds
161 | proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
162 | }
163 | }
164 | // applicationVariants are e.g. debug, release
165 | applicationVariants.all { variant ->
166 | variant.outputs.each { output ->
167 | // For each separate APK per architecture, set a unique version code as described here:
168 | // https://developer.android.com/studio/build/configure-apk-splits.html
169 | def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
170 | def abi = output.getFilter(OutputFile.ABI)
171 | if (abi != null) { // null for the universal-debug, universal-release variants
172 | output.versionCodeOverride =
173 | versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
174 | }
175 |
176 | }
177 | }
178 |
179 | packagingOptions {
180 | pickFirst "lib/armeabi-v7a/libc++_shared.so"
181 | pickFirst "lib/arm64-v8a/libc++_shared.so"
182 | pickFirst "lib/x86/libc++_shared.so"
183 | pickFirst "lib/x86_64/libc++_shared.so"
184 | }
185 | }
186 |
187 | dependencies {
188 | implementation fileTree(dir: "libs", include: ["*.jar"])
189 | //noinspection GradleDynamicVersion
190 | implementation "com.facebook.react:react-native:+" // From node_modules
191 |
192 |
193 | implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
194 | debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
195 | exclude group:'com.facebook.fbjni'
196 | }
197 | debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
198 | exclude group:'com.facebook.flipper'
199 | }
200 | debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
201 | exclude group:'com.facebook.flipper'
202 | }
203 |
204 | if (enableHermes) {
205 | def hermesPath = "../../node_modules/hermes-engine/android/";
206 | debugImplementation files(hermesPath + "hermes-debug.aar")
207 | releaseImplementation files(hermesPath + "hermes-release.aar")
208 | } else {
209 | implementation jscFlavor
210 | }
211 |
212 | }
213 |
214 | // Run this once to be able to run the application with BUCK
215 | // puts all compile dependencies into folder libs for BUCK to use
216 | task copyDownloadableDepsToLibs(type: Copy) {
217 | from configurations.compile
218 | into 'libs'
219 | }
220 |
221 | apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
222 |
--------------------------------------------------------------------------------
/example/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - boost-for-react-native (1.63.0)
3 | - CocoaAsyncSocket (7.6.5)
4 | - DoubleConversion (1.1.6)
5 | - FBLazyVector (0.62.2)
6 | - FBReactNativeSpec (0.62.2):
7 | - Folly (= 2018.10.22.00)
8 | - RCTRequired (= 0.62.2)
9 | - RCTTypeSafety (= 0.62.2)
10 | - React-Core (= 0.62.2)
11 | - React-jsi (= 0.62.2)
12 | - ReactCommon/turbomodule/core (= 0.62.2)
13 | - Flipper (0.74.0):
14 | - Flipper-Folly (~> 2.5)
15 | - Flipper-RSocket (~> 1.3)
16 | - Flipper-DoubleConversion (1.1.7)
17 | - Flipper-Folly (2.5.3):
18 | - boost-for-react-native
19 | - Flipper-DoubleConversion
20 | - Flipper-Glog
21 | - libevent (~> 2.1.12)
22 | - OpenSSL-Universal (= 1.1.180)
23 | - Flipper-Glog (0.5.0.4)
24 | - Flipper-PeerTalk (0.0.4)
25 | - Flipper-RSocket (1.3.1):
26 | - Flipper-Folly (~> 2.5)
27 | - FlipperKit (0.74.0):
28 | - FlipperKit/Core (= 0.74.0)
29 | - FlipperKit/Core (0.74.0):
30 | - Flipper (~> 0.74.0)
31 | - FlipperKit/CppBridge
32 | - FlipperKit/FBCxxFollyDynamicConvert
33 | - FlipperKit/FBDefines
34 | - FlipperKit/FKPortForwarding
35 | - FlipperKit/CppBridge (0.74.0):
36 | - Flipper (~> 0.74.0)
37 | - FlipperKit/FBCxxFollyDynamicConvert (0.74.0):
38 | - Flipper-Folly (~> 2.5)
39 | - FlipperKit/FBDefines (0.74.0)
40 | - FlipperKit/FKPortForwarding (0.74.0):
41 | - CocoaAsyncSocket (~> 7.6)
42 | - Flipper-PeerTalk (~> 0.0.4)
43 | - FlipperKit/FlipperKitHighlightOverlay (0.74.0)
44 | - FlipperKit/FlipperKitLayoutPlugin (0.74.0):
45 | - FlipperKit/Core
46 | - FlipperKit/FlipperKitHighlightOverlay
47 | - FlipperKit/FlipperKitLayoutTextSearchable
48 | - YogaKit (~> 1.18)
49 | - FlipperKit/FlipperKitLayoutTextSearchable (0.74.0)
50 | - FlipperKit/FlipperKitNetworkPlugin (0.74.0):
51 | - FlipperKit/Core
52 | - FlipperKit/FlipperKitReactPlugin (0.74.0):
53 | - FlipperKit/Core
54 | - FlipperKit/FlipperKitUserDefaultsPlugin (0.74.0):
55 | - FlipperKit/Core
56 | - FlipperKit/SKIOSNetworkPlugin (0.74.0):
57 | - FlipperKit/Core
58 | - FlipperKit/FlipperKitNetworkPlugin
59 | - Folly (2018.10.22.00):
60 | - boost-for-react-native
61 | - DoubleConversion
62 | - Folly/Default (= 2018.10.22.00)
63 | - glog
64 | - Folly/Default (2018.10.22.00):
65 | - boost-for-react-native
66 | - DoubleConversion
67 | - glog
68 | - glog (0.3.5)
69 | - libevent (2.1.12)
70 | - OpenSSL-Universal (1.1.180)
71 | - RCTRequired (0.62.2)
72 | - RCTTypeSafety (0.62.2):
73 | - FBLazyVector (= 0.62.2)
74 | - Folly (= 2018.10.22.00)
75 | - RCTRequired (= 0.62.2)
76 | - React-Core (= 0.62.2)
77 | - React (0.62.2):
78 | - React-Core (= 0.62.2)
79 | - React-Core/DevSupport (= 0.62.2)
80 | - React-Core/RCTWebSocket (= 0.62.2)
81 | - React-RCTActionSheet (= 0.62.2)
82 | - React-RCTAnimation (= 0.62.2)
83 | - React-RCTBlob (= 0.62.2)
84 | - React-RCTImage (= 0.62.2)
85 | - React-RCTLinking (= 0.62.2)
86 | - React-RCTNetwork (= 0.62.2)
87 | - React-RCTSettings (= 0.62.2)
88 | - React-RCTText (= 0.62.2)
89 | - React-RCTVibration (= 0.62.2)
90 | - React-Core (0.62.2):
91 | - Folly (= 2018.10.22.00)
92 | - glog
93 | - React-Core/Default (= 0.62.2)
94 | - React-cxxreact (= 0.62.2)
95 | - React-jsi (= 0.62.2)
96 | - React-jsiexecutor (= 0.62.2)
97 | - Yoga
98 | - React-Core/CoreModulesHeaders (0.62.2):
99 | - Folly (= 2018.10.22.00)
100 | - glog
101 | - React-Core/Default
102 | - React-cxxreact (= 0.62.2)
103 | - React-jsi (= 0.62.2)
104 | - React-jsiexecutor (= 0.62.2)
105 | - Yoga
106 | - React-Core/Default (0.62.2):
107 | - Folly (= 2018.10.22.00)
108 | - glog
109 | - React-cxxreact (= 0.62.2)
110 | - React-jsi (= 0.62.2)
111 | - React-jsiexecutor (= 0.62.2)
112 | - Yoga
113 | - React-Core/DevSupport (0.62.2):
114 | - Folly (= 2018.10.22.00)
115 | - glog
116 | - React-Core/Default (= 0.62.2)
117 | - React-Core/RCTWebSocket (= 0.62.2)
118 | - React-cxxreact (= 0.62.2)
119 | - React-jsi (= 0.62.2)
120 | - React-jsiexecutor (= 0.62.2)
121 | - React-jsinspector (= 0.62.2)
122 | - Yoga
123 | - React-Core/RCTActionSheetHeaders (0.62.2):
124 | - Folly (= 2018.10.22.00)
125 | - glog
126 | - React-Core/Default
127 | - React-cxxreact (= 0.62.2)
128 | - React-jsi (= 0.62.2)
129 | - React-jsiexecutor (= 0.62.2)
130 | - Yoga
131 | - React-Core/RCTAnimationHeaders (0.62.2):
132 | - Folly (= 2018.10.22.00)
133 | - glog
134 | - React-Core/Default
135 | - React-cxxreact (= 0.62.2)
136 | - React-jsi (= 0.62.2)
137 | - React-jsiexecutor (= 0.62.2)
138 | - Yoga
139 | - React-Core/RCTBlobHeaders (0.62.2):
140 | - Folly (= 2018.10.22.00)
141 | - glog
142 | - React-Core/Default
143 | - React-cxxreact (= 0.62.2)
144 | - React-jsi (= 0.62.2)
145 | - React-jsiexecutor (= 0.62.2)
146 | - Yoga
147 | - React-Core/RCTImageHeaders (0.62.2):
148 | - Folly (= 2018.10.22.00)
149 | - glog
150 | - React-Core/Default
151 | - React-cxxreact (= 0.62.2)
152 | - React-jsi (= 0.62.2)
153 | - React-jsiexecutor (= 0.62.2)
154 | - Yoga
155 | - React-Core/RCTLinkingHeaders (0.62.2):
156 | - Folly (= 2018.10.22.00)
157 | - glog
158 | - React-Core/Default
159 | - React-cxxreact (= 0.62.2)
160 | - React-jsi (= 0.62.2)
161 | - React-jsiexecutor (= 0.62.2)
162 | - Yoga
163 | - React-Core/RCTNetworkHeaders (0.62.2):
164 | - Folly (= 2018.10.22.00)
165 | - glog
166 | - React-Core/Default
167 | - React-cxxreact (= 0.62.2)
168 | - React-jsi (= 0.62.2)
169 | - React-jsiexecutor (= 0.62.2)
170 | - Yoga
171 | - React-Core/RCTSettingsHeaders (0.62.2):
172 | - Folly (= 2018.10.22.00)
173 | - glog
174 | - React-Core/Default
175 | - React-cxxreact (= 0.62.2)
176 | - React-jsi (= 0.62.2)
177 | - React-jsiexecutor (= 0.62.2)
178 | - Yoga
179 | - React-Core/RCTTextHeaders (0.62.2):
180 | - Folly (= 2018.10.22.00)
181 | - glog
182 | - React-Core/Default
183 | - React-cxxreact (= 0.62.2)
184 | - React-jsi (= 0.62.2)
185 | - React-jsiexecutor (= 0.62.2)
186 | - Yoga
187 | - React-Core/RCTVibrationHeaders (0.62.2):
188 | - Folly (= 2018.10.22.00)
189 | - glog
190 | - React-Core/Default
191 | - React-cxxreact (= 0.62.2)
192 | - React-jsi (= 0.62.2)
193 | - React-jsiexecutor (= 0.62.2)
194 | - Yoga
195 | - React-Core/RCTWebSocket (0.62.2):
196 | - Folly (= 2018.10.22.00)
197 | - glog
198 | - React-Core/Default (= 0.62.2)
199 | - React-cxxreact (= 0.62.2)
200 | - React-jsi (= 0.62.2)
201 | - React-jsiexecutor (= 0.62.2)
202 | - Yoga
203 | - React-CoreModules (0.62.2):
204 | - FBReactNativeSpec (= 0.62.2)
205 | - Folly (= 2018.10.22.00)
206 | - RCTTypeSafety (= 0.62.2)
207 | - React-Core/CoreModulesHeaders (= 0.62.2)
208 | - React-RCTImage (= 0.62.2)
209 | - ReactCommon/turbomodule/core (= 0.62.2)
210 | - React-cxxreact (0.62.2):
211 | - boost-for-react-native (= 1.63.0)
212 | - DoubleConversion
213 | - Folly (= 2018.10.22.00)
214 | - glog
215 | - React-jsinspector (= 0.62.2)
216 | - React-jsi (0.62.2):
217 | - boost-for-react-native (= 1.63.0)
218 | - DoubleConversion
219 | - Folly (= 2018.10.22.00)
220 | - glog
221 | - React-jsi/Default (= 0.62.2)
222 | - React-jsi/Default (0.62.2):
223 | - boost-for-react-native (= 1.63.0)
224 | - DoubleConversion
225 | - Folly (= 2018.10.22.00)
226 | - glog
227 | - React-jsiexecutor (0.62.2):
228 | - DoubleConversion
229 | - Folly (= 2018.10.22.00)
230 | - glog
231 | - React-cxxreact (= 0.62.2)
232 | - React-jsi (= 0.62.2)
233 | - React-jsinspector (0.62.2)
234 | - React-RCTActionSheet (0.62.2):
235 | - React-Core/RCTActionSheetHeaders (= 0.62.2)
236 | - React-RCTAnimation (0.62.2):
237 | - FBReactNativeSpec (= 0.62.2)
238 | - Folly (= 2018.10.22.00)
239 | - RCTTypeSafety (= 0.62.2)
240 | - React-Core/RCTAnimationHeaders (= 0.62.2)
241 | - ReactCommon/turbomodule/core (= 0.62.2)
242 | - React-RCTBlob (0.62.2):
243 | - FBReactNativeSpec (= 0.62.2)
244 | - Folly (= 2018.10.22.00)
245 | - React-Core/RCTBlobHeaders (= 0.62.2)
246 | - React-Core/RCTWebSocket (= 0.62.2)
247 | - React-jsi (= 0.62.2)
248 | - React-RCTNetwork (= 0.62.2)
249 | - ReactCommon/turbomodule/core (= 0.62.2)
250 | - React-RCTImage (0.62.2):
251 | - FBReactNativeSpec (= 0.62.2)
252 | - Folly (= 2018.10.22.00)
253 | - RCTTypeSafety (= 0.62.2)
254 | - React-Core/RCTImageHeaders (= 0.62.2)
255 | - React-RCTNetwork (= 0.62.2)
256 | - ReactCommon/turbomodule/core (= 0.62.2)
257 | - React-RCTLinking (0.62.2):
258 | - FBReactNativeSpec (= 0.62.2)
259 | - React-Core/RCTLinkingHeaders (= 0.62.2)
260 | - ReactCommon/turbomodule/core (= 0.62.2)
261 | - React-RCTNetwork (0.62.2):
262 | - FBReactNativeSpec (= 0.62.2)
263 | - Folly (= 2018.10.22.00)
264 | - RCTTypeSafety (= 0.62.2)
265 | - React-Core/RCTNetworkHeaders (= 0.62.2)
266 | - ReactCommon/turbomodule/core (= 0.62.2)
267 | - React-RCTSettings (0.62.2):
268 | - FBReactNativeSpec (= 0.62.2)
269 | - Folly (= 2018.10.22.00)
270 | - RCTTypeSafety (= 0.62.2)
271 | - React-Core/RCTSettingsHeaders (= 0.62.2)
272 | - ReactCommon/turbomodule/core (= 0.62.2)
273 | - React-RCTText (0.62.2):
274 | - React-Core/RCTTextHeaders (= 0.62.2)
275 | - React-RCTVibration (0.62.2):
276 | - FBReactNativeSpec (= 0.62.2)
277 | - Folly (= 2018.10.22.00)
278 | - React-Core/RCTVibrationHeaders (= 0.62.2)
279 | - ReactCommon/turbomodule/core (= 0.62.2)
280 | - ReactCommon/callinvoker (0.62.2):
281 | - DoubleConversion
282 | - Folly (= 2018.10.22.00)
283 | - glog
284 | - React-cxxreact (= 0.62.2)
285 | - ReactCommon/turbomodule/core (0.62.2):
286 | - DoubleConversion
287 | - Folly (= 2018.10.22.00)
288 | - glog
289 | - React-Core (= 0.62.2)
290 | - React-cxxreact (= 0.62.2)
291 | - React-jsi (= 0.62.2)
292 | - ReactCommon/callinvoker (= 0.62.2)
293 | - RNInAppBrowser (3.6.3):
294 | - React-Core
295 | - Yoga (1.14.0)
296 | - YogaKit (1.18.1):
297 | - Yoga (~> 1.14)
298 |
299 | DEPENDENCIES:
300 | - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
301 | - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
302 | - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
303 | - Flipper-DoubleConversion (~> 1.1.7)
304 | - Flipper-Folly (~> 2.5.3)
305 | - FlipperKit (~> 0.74.0)
306 | - FlipperKit/FlipperKitLayoutPlugin (~> 0.74.0)
307 | - FlipperKit/FlipperKitReactPlugin (~> 0.74.0)
308 | - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.74.0)
309 | - FlipperKit/SKIOSNetworkPlugin (~> 0.74.0)
310 | - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`)
311 | - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
312 | - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
313 | - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`)
314 | - React (from `../node_modules/react-native/`)
315 | - React-Core (from `../node_modules/react-native/`)
316 | - React-Core/DevSupport (from `../node_modules/react-native/`)
317 | - React-Core/RCTWebSocket (from `../node_modules/react-native/`)
318 | - React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
319 | - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
320 | - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`)
321 | - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
322 | - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
323 | - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
324 | - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
325 | - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`)
326 | - React-RCTImage (from `../node_modules/react-native/Libraries/Image`)
327 | - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`)
328 | - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`)
329 | - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`)
330 | - React-RCTText (from `../node_modules/react-native/Libraries/Text`)
331 | - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
332 | - ReactCommon/callinvoker (from `../node_modules/react-native/ReactCommon`)
333 | - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
334 | - RNInAppBrowser (from `../node_modules/react-native-inappbrowser-reborn`)
335 | - Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
336 |
337 | SPEC REPOS:
338 | trunk:
339 | - boost-for-react-native
340 | - CocoaAsyncSocket
341 | - Flipper
342 | - Flipper-DoubleConversion
343 | - Flipper-Folly
344 | - Flipper-Glog
345 | - Flipper-PeerTalk
346 | - Flipper-RSocket
347 | - FlipperKit
348 | - libevent
349 | - OpenSSL-Universal
350 | - YogaKit
351 |
352 | EXTERNAL SOURCES:
353 | DoubleConversion:
354 | :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
355 | FBLazyVector:
356 | :path: "../node_modules/react-native/Libraries/FBLazyVector"
357 | FBReactNativeSpec:
358 | :path: "../node_modules/react-native/Libraries/FBReactNativeSpec"
359 | Folly:
360 | :podspec: "../node_modules/react-native/third-party-podspecs/Folly.podspec"
361 | glog:
362 | :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec"
363 | RCTRequired:
364 | :path: "../node_modules/react-native/Libraries/RCTRequired"
365 | RCTTypeSafety:
366 | :path: "../node_modules/react-native/Libraries/TypeSafety"
367 | React:
368 | :path: "../node_modules/react-native/"
369 | React-Core:
370 | :path: "../node_modules/react-native/"
371 | React-CoreModules:
372 | :path: "../node_modules/react-native/React/CoreModules"
373 | React-cxxreact:
374 | :path: "../node_modules/react-native/ReactCommon/cxxreact"
375 | React-jsi:
376 | :path: "../node_modules/react-native/ReactCommon/jsi"
377 | React-jsiexecutor:
378 | :path: "../node_modules/react-native/ReactCommon/jsiexecutor"
379 | React-jsinspector:
380 | :path: "../node_modules/react-native/ReactCommon/jsinspector"
381 | React-RCTActionSheet:
382 | :path: "../node_modules/react-native/Libraries/ActionSheetIOS"
383 | React-RCTAnimation:
384 | :path: "../node_modules/react-native/Libraries/NativeAnimation"
385 | React-RCTBlob:
386 | :path: "../node_modules/react-native/Libraries/Blob"
387 | React-RCTImage:
388 | :path: "../node_modules/react-native/Libraries/Image"
389 | React-RCTLinking:
390 | :path: "../node_modules/react-native/Libraries/LinkingIOS"
391 | React-RCTNetwork:
392 | :path: "../node_modules/react-native/Libraries/Network"
393 | React-RCTSettings:
394 | :path: "../node_modules/react-native/Libraries/Settings"
395 | React-RCTText:
396 | :path: "../node_modules/react-native/Libraries/Text"
397 | React-RCTVibration:
398 | :path: "../node_modules/react-native/Libraries/Vibration"
399 | ReactCommon:
400 | :path: "../node_modules/react-native/ReactCommon"
401 | RNInAppBrowser:
402 | :path: "../node_modules/react-native-inappbrowser-reborn"
403 | Yoga:
404 | :path: "../node_modules/react-native/ReactCommon/yoga"
405 |
406 | SPEC CHECKSUMS:
407 | boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
408 | CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
409 | DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
410 | FBLazyVector: 4aab18c93cd9546e4bfed752b4084585eca8b245
411 | FBReactNativeSpec: 5465d51ccfeecb7faa12f9ae0024f2044ce4044e
412 | Flipper: c1ad50344bffdce628b1906b48f6e7cd06724236
413 | Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41
414 | Flipper-Folly: 755929a4f851b2fb2c347d533a23f191b008554c
415 | Flipper-Glog: 87bc98ff48de90cb5b0b5114ed3da79d85ee2dd4
416 | Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
417 | Flipper-RSocket: 127954abe8b162fcaf68d2134d34dc2bd7076154
418 | FlipperKit: f42987ea58737ac0fb3fbc38f8e703452ba56940
419 | Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
420 | glog: 1f3da668190260b06b429bb211bfbee5cd790c28
421 | libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
422 | OpenSSL-Universal: 1aa4f6a6ee7256b83db99ec1ccdaa80d10f9af9b
423 | RCTRequired: cec6a34b3ac8a9915c37e7e4ad3aa74726ce4035
424 | RCTTypeSafety: 93006131180074cffa227a1075802c89a49dd4ce
425 | React: 29a8b1a02bd764fb7644ef04019270849b9a7ac3
426 | React-Core: b12bffb3f567fdf99510acb716ef1abd426e0e05
427 | React-CoreModules: 4a9b87bbe669d6c3173c0132c3328e3b000783d0
428 | React-cxxreact: e65f9c2ba0ac5be946f53548c1aaaee5873a8103
429 | React-jsi: b6dc94a6a12ff98e8877287a0b7620d365201161
430 | React-jsiexecutor: 1540d1c01bb493ae3124ed83351b1b6a155db7da
431 | React-jsinspector: 512e560d0e985d0e8c479a54a4e5c147a9c83493
432 | React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
433 | React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
434 | React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
435 | React-RCTImage: e70be9b9c74fe4e42d0005f42cace7981c994ac3
436 | React-RCTLinking: c1b9739a88d56ecbec23b7f63650e44672ab2ad2
437 | React-RCTNetwork: 73138b6f45e5a2768ad93f3d57873c2a18d14b44
438 | React-RCTSettings: 6e3738a87e21b39a8cb08d627e68c44acf1e325a
439 | React-RCTText: fae545b10cfdb3d247c36c56f61a94cfd6dba41d
440 | React-RCTVibration: 4356114dbcba4ce66991096e51a66e61eda51256
441 | ReactCommon: ed4e11d27609d571e7eee8b65548efc191116eb3
442 | RNInAppBrowser: 3ff3a3b8f458aaf25aaee879d057352862edf357
443 | Yoga: 3ebccbdd559724312790e7742142d062476b698e
444 | YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
445 |
446 | PODFILE CHECKSUM: 6ea368f35807e3b9e853e74fbd8e033b806e284c
447 |
448 | COCOAPODS: 1.11.3
449 |
--------------------------------------------------------------------------------
/example/ios/KeycloakExample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 0D1336C0461A88D01186E375 /* libPods-KeycloakExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BCEA90A70F4BEAD7E9FA28B2 /* libPods-KeycloakExample.a */; };
11 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; };
12 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; };
13 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14 | 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
15 | 20F357B024636CDF00C146DC /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20F357AF24636CDF00C146DC /* File.swift */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXFileReference section */
19 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; };
20 | 13B07F961A680F5B00A75B9A /* KeycloakExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KeycloakExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = KeycloakExample/AppDelegate.h; sourceTree = ""; };
22 | 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = KeycloakExample/AppDelegate.m; sourceTree = ""; };
23 | 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
24 | 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = KeycloakExample/Images.xcassets; sourceTree = ""; };
25 | 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = KeycloakExample/Info.plist; sourceTree = ""; };
26 | 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = KeycloakExample/main.m; sourceTree = ""; };
27 | 20F357AD24636CDE00C146DC /* KeycloakExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "KeycloakExample-Bridging-Header.h"; sourceTree = ""; };
28 | 20F357AE24636CDF00C146DC /* KeycloakExample-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "KeycloakExample-Bridging-Header.h"; sourceTree = ""; };
29 | 20F357AF24636CDF00C146DC /* File.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = ""; };
30 | 4D7192F03A36A017E887435B /* Pods-KeycloakExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KeycloakExample.release.xcconfig"; path = "Target Support Files/Pods-KeycloakExample/Pods-KeycloakExample.release.xcconfig"; sourceTree = ""; };
31 | 871719007ECC5EAD276C345C /* Pods-KeycloakExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-KeycloakExample.debug.xcconfig"; path = "Target Support Files/Pods-KeycloakExample/Pods-KeycloakExample.debug.xcconfig"; sourceTree = ""; };
32 | BCEA90A70F4BEAD7E9FA28B2 /* libPods-KeycloakExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-KeycloakExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
33 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
34 | /* End PBXFileReference section */
35 |
36 | /* Begin PBXFrameworksBuildPhase section */
37 | 13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
38 | isa = PBXFrameworksBuildPhase;
39 | buildActionMask = 2147483647;
40 | files = (
41 | 0D1336C0461A88D01186E375 /* libPods-KeycloakExample.a in Frameworks */,
42 | );
43 | runOnlyForDeploymentPostprocessing = 0;
44 | };
45 | /* End PBXFrameworksBuildPhase section */
46 |
47 | /* Begin PBXGroup section */
48 | 13B07FAE1A68108700A75B9A /* KeycloakExample */ = {
49 | isa = PBXGroup;
50 | children = (
51 | 008F07F21AC5B25A0029DE68 /* main.jsbundle */,
52 | 13B07FAF1A68108700A75B9A /* AppDelegate.h */,
53 | 13B07FB01A68108700A75B9A /* AppDelegate.m */,
54 | 13B07FB51A68108700A75B9A /* Images.xcassets */,
55 | 13B07FB61A68108700A75B9A /* Info.plist */,
56 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */,
57 | 13B07FB71A68108700A75B9A /* main.m */,
58 | );
59 | name = KeycloakExample;
60 | sourceTree = "";
61 | };
62 | 1CFFDEF7170271C97B8B7E5A /* Pods */ = {
63 | isa = PBXGroup;
64 | children = (
65 | 871719007ECC5EAD276C345C /* Pods-KeycloakExample.debug.xcconfig */,
66 | 4D7192F03A36A017E887435B /* Pods-KeycloakExample.release.xcconfig */,
67 | );
68 | path = Pods;
69 | sourceTree = "";
70 | };
71 | 2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
72 | isa = PBXGroup;
73 | children = (
74 | ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
75 | BCEA90A70F4BEAD7E9FA28B2 /* libPods-KeycloakExample.a */,
76 | );
77 | name = Frameworks;
78 | sourceTree = "";
79 | };
80 | 832341AE1AAA6A7D00B99B32 /* Libraries */ = {
81 | isa = PBXGroup;
82 | children = (
83 | );
84 | name = Libraries;
85 | sourceTree = "";
86 | };
87 | 83CBB9F61A601CBA00E9B192 = {
88 | isa = PBXGroup;
89 | children = (
90 | 20F357AF24636CDF00C146DC /* File.swift */,
91 | 20F357AE24636CDF00C146DC /* KeycloakExample-Bridging-Header.h */,
92 | 13B07FAE1A68108700A75B9A /* KeycloakExample */,
93 | 832341AE1AAA6A7D00B99B32 /* Libraries */,
94 | 83CBBA001A601CBA00E9B192 /* Products */,
95 | 2D16E6871FA4F8E400B85C8A /* Frameworks */,
96 | 1CFFDEF7170271C97B8B7E5A /* Pods */,
97 | 20F357AD24636CDE00C146DC /* KeycloakExample-Bridging-Header.h */,
98 | );
99 | indentWidth = 2;
100 | sourceTree = "";
101 | tabWidth = 2;
102 | usesTabs = 0;
103 | };
104 | 83CBBA001A601CBA00E9B192 /* Products */ = {
105 | isa = PBXGroup;
106 | children = (
107 | 13B07F961A680F5B00A75B9A /* KeycloakExample.app */,
108 | );
109 | name = Products;
110 | sourceTree = "";
111 | };
112 | /* End PBXGroup section */
113 |
114 | /* Begin PBXNativeTarget section */
115 | 13B07F861A680F5B00A75B9A /* KeycloakExample */ = {
116 | isa = PBXNativeTarget;
117 | buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "KeycloakExample" */;
118 | buildPhases = (
119 | CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */,
120 | FD10A7F022414F080027D42C /* Start Packager */,
121 | 13B07F871A680F5B00A75B9A /* Sources */,
122 | 13B07F8C1A680F5B00A75B9A /* Frameworks */,
123 | 13B07F8E1A680F5B00A75B9A /* Resources */,
124 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
125 | 0AE72DE04C7F0143443D4D29 /* [CP] Embed Pods Frameworks */,
126 | );
127 | buildRules = (
128 | );
129 | dependencies = (
130 | );
131 | name = KeycloakExample;
132 | productName = KeycloakExample;
133 | productReference = 13B07F961A680F5B00A75B9A /* KeycloakExample.app */;
134 | productType = "com.apple.product-type.application";
135 | };
136 | /* End PBXNativeTarget section */
137 |
138 | /* Begin PBXProject section */
139 | 83CBB9F71A601CBA00E9B192 /* Project object */ = {
140 | isa = PBXProject;
141 | attributes = {
142 | LastUpgradeCheck = 0940;
143 | ORGANIZATIONNAME = Facebook;
144 | TargetAttributes = {
145 | 13B07F861A680F5B00A75B9A = {
146 | LastSwiftMigration = 1110;
147 | };
148 | };
149 | };
150 | buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "KeycloakExample" */;
151 | compatibilityVersion = "Xcode 3.2";
152 | developmentRegion = English;
153 | hasScannedForEncodings = 0;
154 | knownRegions = (
155 | English,
156 | en,
157 | Base,
158 | );
159 | mainGroup = 83CBB9F61A601CBA00E9B192;
160 | productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */;
161 | projectDirPath = "";
162 | projectRoot = "";
163 | targets = (
164 | 13B07F861A680F5B00A75B9A /* KeycloakExample */,
165 | );
166 | };
167 | /* End PBXProject section */
168 |
169 | /* Begin PBXResourcesBuildPhase section */
170 | 13B07F8E1A680F5B00A75B9A /* Resources */ = {
171 | isa = PBXResourcesBuildPhase;
172 | buildActionMask = 2147483647;
173 | files = (
174 | 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
175 | 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */,
176 | );
177 | runOnlyForDeploymentPostprocessing = 0;
178 | };
179 | /* End PBXResourcesBuildPhase section */
180 |
181 | /* Begin PBXShellScriptBuildPhase section */
182 | 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = {
183 | isa = PBXShellScriptBuildPhase;
184 | buildActionMask = 2147483647;
185 | files = (
186 | );
187 | inputPaths = (
188 | );
189 | name = "Bundle React Native code and images";
190 | outputPaths = (
191 | );
192 | runOnlyForDeploymentPostprocessing = 0;
193 | shellPath = /bin/sh;
194 | shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
195 | };
196 | 0AE72DE04C7F0143443D4D29 /* [CP] Embed Pods Frameworks */ = {
197 | isa = PBXShellScriptBuildPhase;
198 | buildActionMask = 2147483647;
199 | files = (
200 | );
201 | inputPaths = (
202 | "${PODS_ROOT}/Target Support Files/Pods-KeycloakExample/Pods-KeycloakExample-frameworks.sh",
203 | "${PODS_XCFRAMEWORKS_BUILD_DIR}/Flipper-Glog/glog.framework/glog",
204 | "${PODS_XCFRAMEWORKS_BUILD_DIR}/OpenSSL-Universal/OpenSSL.framework/OpenSSL",
205 | );
206 | name = "[CP] Embed Pods Frameworks";
207 | outputPaths = (
208 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework",
209 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OpenSSL.framework",
210 | );
211 | runOnlyForDeploymentPostprocessing = 0;
212 | shellPath = /bin/sh;
213 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-KeycloakExample/Pods-KeycloakExample-frameworks.sh\"\n";
214 | showEnvVarsInLog = 0;
215 | };
216 | CCCC07BCAFDEF1FCADC0D0C9 /* [CP] Check Pods Manifest.lock */ = {
217 | isa = PBXShellScriptBuildPhase;
218 | buildActionMask = 2147483647;
219 | files = (
220 | );
221 | inputFileListPaths = (
222 | );
223 | inputPaths = (
224 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
225 | "${PODS_ROOT}/Manifest.lock",
226 | );
227 | name = "[CP] Check Pods Manifest.lock";
228 | outputFileListPaths = (
229 | );
230 | outputPaths = (
231 | "$(DERIVED_FILE_DIR)/Pods-KeycloakExample-checkManifestLockResult.txt",
232 | );
233 | runOnlyForDeploymentPostprocessing = 0;
234 | shellPath = /bin/sh;
235 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
236 | showEnvVarsInLog = 0;
237 | };
238 | FD10A7F022414F080027D42C /* Start Packager */ = {
239 | isa = PBXShellScriptBuildPhase;
240 | buildActionMask = 2147483647;
241 | files = (
242 | );
243 | inputFileListPaths = (
244 | );
245 | inputPaths = (
246 | );
247 | name = "Start Packager";
248 | outputFileListPaths = (
249 | );
250 | outputPaths = (
251 | );
252 | runOnlyForDeploymentPostprocessing = 0;
253 | shellPath = /bin/sh;
254 | shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
255 | showEnvVarsInLog = 0;
256 | };
257 | /* End PBXShellScriptBuildPhase section */
258 |
259 | /* Begin PBXSourcesBuildPhase section */
260 | 13B07F871A680F5B00A75B9A /* Sources */ = {
261 | isa = PBXSourcesBuildPhase;
262 | buildActionMask = 2147483647;
263 | files = (
264 | 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */,
265 | 20F357B024636CDF00C146DC /* File.swift in Sources */,
266 | 13B07FC11A68108700A75B9A /* main.m in Sources */,
267 | );
268 | runOnlyForDeploymentPostprocessing = 0;
269 | };
270 | /* End PBXSourcesBuildPhase section */
271 |
272 | /* Begin PBXVariantGroup section */
273 | 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = {
274 | isa = PBXVariantGroup;
275 | children = (
276 | 13B07FB21A68108700A75B9A /* Base */,
277 | );
278 | name = LaunchScreen.xib;
279 | path = KeycloakExample;
280 | sourceTree = "";
281 | };
282 | /* End PBXVariantGroup section */
283 |
284 | /* Begin XCBuildConfiguration section */
285 | 13B07F941A680F5B00A75B9A /* Debug */ = {
286 | isa = XCBuildConfiguration;
287 | baseConfigurationReference = 871719007ECC5EAD276C345C /* Pods-KeycloakExample.debug.xcconfig */;
288 | buildSettings = {
289 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
290 | CLANG_ENABLE_MODULES = YES;
291 | CURRENT_PROJECT_VERSION = 1;
292 | DEAD_CODE_STRIPPING = NO;
293 | INFOPLIST_FILE = KeycloakExample/Info.plist;
294 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
295 | OTHER_CFLAGS = (
296 | "$(inherited)",
297 | "-DFB_SONARKIT_ENABLED=1",
298 | );
299 | OTHER_LDFLAGS = (
300 | "$(inherited)",
301 | "-ObjC",
302 | "-lc++",
303 | );
304 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.KeycloakExample.$(PRODUCT_NAME:rfc1034identifier)";
305 | PRODUCT_NAME = KeycloakExample;
306 | SWIFT_OBJC_BRIDGING_HEADER = "KeycloakExample-Bridging-Header.h";
307 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
308 | SWIFT_VERSION = 5.0;
309 | VERSIONING_SYSTEM = "apple-generic";
310 | };
311 | name = Debug;
312 | };
313 | 13B07F951A680F5B00A75B9A /* Release */ = {
314 | isa = XCBuildConfiguration;
315 | baseConfigurationReference = 4D7192F03A36A017E887435B /* Pods-KeycloakExample.release.xcconfig */;
316 | buildSettings = {
317 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
318 | CLANG_ENABLE_MODULES = YES;
319 | CURRENT_PROJECT_VERSION = 1;
320 | INFOPLIST_FILE = KeycloakExample/Info.plist;
321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
322 | OTHER_CFLAGS = (
323 | "$(inherited)",
324 | "-DFB_SONARKIT_ENABLED=1",
325 | );
326 | OTHER_LDFLAGS = (
327 | "$(inherited)",
328 | "-ObjC",
329 | "-lc++",
330 | );
331 | PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.KeycloakExample.$(PRODUCT_NAME:rfc1034identifier)";
332 | PRODUCT_NAME = KeycloakExample;
333 | SWIFT_OBJC_BRIDGING_HEADER = "KeycloakExample-Bridging-Header.h";
334 | SWIFT_VERSION = 5.0;
335 | VERSIONING_SYSTEM = "apple-generic";
336 | };
337 | name = Release;
338 | };
339 | 83CBBA201A601CBA00E9B192 /* Debug */ = {
340 | isa = XCBuildConfiguration;
341 | buildSettings = {
342 | ALWAYS_SEARCH_USER_PATHS = NO;
343 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
344 | CLANG_CXX_LIBRARY = "libc++";
345 | CLANG_ENABLE_MODULES = YES;
346 | CLANG_ENABLE_OBJC_ARC = YES;
347 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
348 | CLANG_WARN_BOOL_CONVERSION = YES;
349 | CLANG_WARN_COMMA = YES;
350 | CLANG_WARN_CONSTANT_CONVERSION = YES;
351 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
353 | CLANG_WARN_EMPTY_BODY = YES;
354 | CLANG_WARN_ENUM_CONVERSION = YES;
355 | CLANG_WARN_INFINITE_RECURSION = YES;
356 | CLANG_WARN_INT_CONVERSION = YES;
357 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
358 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
362 | CLANG_WARN_STRICT_PROTOTYPES = YES;
363 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
364 | CLANG_WARN_UNREACHABLE_CODE = YES;
365 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
366 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
367 | COPY_PHASE_STRIP = NO;
368 | ENABLE_STRICT_OBJC_MSGSEND = YES;
369 | ENABLE_TESTABILITY = YES;
370 | GCC_C_LANGUAGE_STANDARD = gnu99;
371 | GCC_DYNAMIC_NO_PIC = NO;
372 | GCC_NO_COMMON_BLOCKS = YES;
373 | GCC_OPTIMIZATION_LEVEL = 0;
374 | GCC_PREPROCESSOR_DEFINITIONS = (
375 | "DEBUG=1",
376 | "$(inherited)",
377 | );
378 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
380 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
381 | GCC_WARN_UNDECLARED_SELECTOR = YES;
382 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
383 | GCC_WARN_UNUSED_FUNCTION = YES;
384 | GCC_WARN_UNUSED_VARIABLE = YES;
385 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
386 | MTL_ENABLE_DEBUG_INFO = YES;
387 | ONLY_ACTIVE_ARCH = YES;
388 | SDKROOT = iphoneos;
389 | };
390 | name = Debug;
391 | };
392 | 83CBBA211A601CBA00E9B192 /* Release */ = {
393 | isa = XCBuildConfiguration;
394 | buildSettings = {
395 | ALWAYS_SEARCH_USER_PATHS = NO;
396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
397 | CLANG_CXX_LIBRARY = "libc++";
398 | CLANG_ENABLE_MODULES = YES;
399 | CLANG_ENABLE_OBJC_ARC = YES;
400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
401 | CLANG_WARN_BOOL_CONVERSION = YES;
402 | CLANG_WARN_COMMA = YES;
403 | CLANG_WARN_CONSTANT_CONVERSION = YES;
404 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
405 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
406 | CLANG_WARN_EMPTY_BODY = YES;
407 | CLANG_WARN_ENUM_CONVERSION = YES;
408 | CLANG_WARN_INFINITE_RECURSION = YES;
409 | CLANG_WARN_INT_CONVERSION = YES;
410 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
411 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
412 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
413 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
414 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
415 | CLANG_WARN_STRICT_PROTOTYPES = YES;
416 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
417 | CLANG_WARN_UNREACHABLE_CODE = YES;
418 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
420 | COPY_PHASE_STRIP = YES;
421 | ENABLE_NS_ASSERTIONS = NO;
422 | ENABLE_STRICT_OBJC_MSGSEND = YES;
423 | GCC_C_LANGUAGE_STANDARD = gnu99;
424 | GCC_NO_COMMON_BLOCKS = YES;
425 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
426 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
427 | GCC_WARN_UNDECLARED_SELECTOR = YES;
428 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
429 | GCC_WARN_UNUSED_FUNCTION = YES;
430 | GCC_WARN_UNUSED_VARIABLE = YES;
431 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
432 | MTL_ENABLE_DEBUG_INFO = NO;
433 | SDKROOT = iphoneos;
434 | VALIDATE_PRODUCT = YES;
435 | };
436 | name = Release;
437 | };
438 | /* End XCBuildConfiguration section */
439 |
440 | /* Begin XCConfigurationList section */
441 | 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "KeycloakExample" */ = {
442 | isa = XCConfigurationList;
443 | buildConfigurations = (
444 | 13B07F941A680F5B00A75B9A /* Debug */,
445 | 13B07F951A680F5B00A75B9A /* Release */,
446 | );
447 | defaultConfigurationIsVisible = 0;
448 | defaultConfigurationName = Release;
449 | };
450 | 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "KeycloakExample" */ = {
451 | isa = XCConfigurationList;
452 | buildConfigurations = (
453 | 83CBBA201A601CBA00E9B192 /* Debug */,
454 | 83CBBA211A601CBA00E9B192 /* Release */,
455 | );
456 | defaultConfigurationIsVisible = 0;
457 | defaultConfigurationName = Release;
458 | };
459 | /* End XCConfigurationList section */
460 | };
461 | rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */;
462 | }
463 |
--------------------------------------------------------------------------------