Skip to content

Commit 52432e8

Browse files
authored
update demo app auth0 acct (#1007)
1 parent 438d512 commit 52432e8

File tree

7 files changed

+57
-26
lines changed

7 files changed

+57
-26
lines changed

.changeset/polite-pants-swim.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'rnaa-demo': patch
3+
---
4+
5+
demo app with new auth0

docs/docs/introduction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Steps:
218218
// etc...
219219
```
220220
221-
2. `AppDelegate.swift` should implement the `RNAppAuthorizationFlowManager` protocol and have a handler for url deep linking. The result should look something like this:
221+
2. `AppDelegate.swift` should implement the `RNAppAuthAuthorizationFlowManager` protocol and have a handler for url deep linking. The result should look something like this:
222222
223223
```swift
224224
@UIApplicationMain

examples/demo/App.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ const configs = {
3131
// }
3232
},
3333
auth0: {
34-
// From https://openidconnect.net/
35-
issuer: 'https://samples.auth0.com',
36-
clientId: 'kbyuFDidLLm280LIwVFiazOqjO3ty8KH',
37-
redirectUrl: 'https://openidconnect.net/callback',
34+
issuer: 'https://rnaa-demo.eu.auth0.com',
35+
clientId: 'VtXdAoGFcYzZ3IJaNy4UIS5RNHhdbKbU',
36+
redirectUrl: 'rnaa-demo://oauthredirect',
3837
additionalParameters: {},
39-
scopes: ['openid', 'profile', 'email', 'phone', 'address'],
38+
scopes: ['openid', 'profile', 'email', 'offline_access'],
4039

4140
// serviceConfiguration: {
4241
// authorizationEndpoint: 'https://samples.auth0.com/authorize',

examples/demo/android/app/build.gradle

-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ android {
8080
targetSdkVersion rootProject.ext.targetSdkVersion
8181
versionCode 1
8282
versionName "1.0"
83-
manifestPlaceholders = [
84-
appAuthRedirectScheme: 'io.identityserver.demo'
85-
]
8683
}
8784
signingConfigs {
8885
debug {

examples/demo/android/app/src/main/AndroidManifest.xml

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
22

33
<uses-permission android:name="android.permission.INTERNET" />
44

@@ -21,5 +21,24 @@
2121
<category android:name="android.intent.category.LAUNCHER" />
2222
</intent-filter>
2323
</activity>
24+
<!-- In order to support multiple possible android redirects: https://github.com/FormidableLabs/react-native-app-auth/issues/495#issuecomment-650797187 -->
25+
<!-- https://github.com/openid/AppAuth-Android/blob/27b62d5da94023941db545b70036a742a52b7070/README.md#capturing-the-authorization-redirect -->
26+
<activity
27+
android:exported="true"
28+
android:name="net.openid.appauth.RedirectUriReceiverActivity"
29+
tools:node="replace">
30+
<intent-filter>
31+
<action android:name="android.intent.action.VIEW"/>
32+
<category android:name="android.intent.category.DEFAULT"/>
33+
<category android:name="android.intent.category.BROWSABLE"/>
34+
<data android:scheme="io.identityserver.demo"/>
35+
</intent-filter>
36+
<intent-filter>
37+
<action android:name="android.intent.action.VIEW"/>
38+
<category android:name="android.intent.category.DEFAULT"/>
39+
<category android:name="android.intent.category.BROWSABLE"/>
40+
<data android:scheme="rnaa-demo"/>
41+
</intent-filter>
42+
</activity>
2443
</application>
2544
</manifest>

examples/demo/components/Page.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import React from 'react';
2-
import { ImageBackground, StyleSheet, SafeAreaView } from 'react-native';
2+
import {ImageBackground, StyleSheet, SafeAreaView} from 'react-native';
33

4-
const Page = ({ children }) => (
4+
const Page = ({children}) => (
55
<ImageBackground
66
source={require('../assets/background.jpg')}
7-
style={[styles.background, { width: '100%', height: '100%' }]}
8-
>
7+
style={[styles.background, {}]}>
98
<SafeAreaView style={styles.safe}>{children}</SafeAreaView>
109
</ImageBackground>
1110
);
@@ -17,10 +16,12 @@ const styles = StyleSheet.create({
1716
paddingTop: 40,
1817
paddingHorizontal: 10,
1918
paddingBottom: 10,
19+
width: '100%',
20+
height: '100%',
2021
},
2122
safe: {
2223
flex: 1,
23-
}
24+
},
2425
});
2526

2627
export default Page;

examples/demo/ios/Example/Info.plist

+21-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,27 @@
2020
<string>$(MARKETING_VERSION)</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
23+
<key>CFBundleURLTypes</key>
24+
<array>
25+
<dict>
26+
<key>CFBundleURLName</key>
27+
<string>com.your.app.identifier</string>
28+
<key>CFBundleURLSchemes</key>
29+
<array>
30+
<string>io.identityserver.demo</string>
31+
</array>
32+
</dict>
33+
<dict>
34+
<key>CFBundleTypeRole</key>
35+
<string>Editor</string>
36+
<key>CFBundleURLName</key>
37+
<string>com.your.app.identifier</string>
38+
<key>CFBundleURLSchemes</key>
39+
<array>
40+
<string>rnaa-demo</string>
41+
</array>
42+
</dict>
43+
</array>
2344
<key>CFBundleVersion</key>
2445
<string>$(CURRENT_PROJECT_VERSION)</string>
2546
<key>LSRequiresIPhoneOS</key>
@@ -51,16 +72,5 @@
5172
</array>
5273
<key>UIViewControllerBasedStatusBarAppearance</key>
5374
<false/>
54-
<key>CFBundleURLTypes</key>
55-
<array>
56-
<dict>
57-
<key>CFBundleURLName</key>
58-
<string>com.your.app.identifier</string>
59-
<key>CFBundleURLSchemes</key>
60-
<array>
61-
<string>io.identityserver.demo</string>
62-
</array>
63-
</dict>
64-
</array>
6575
</dict>
6676
</plist>

0 commit comments

Comments
 (0)