File tree Expand file tree Collapse file tree
main/java/com/auth0/react
test/java/com/auth0/react Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3131 uses : codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f
3232 with :
3333 directory : coverage
34+
35+ android-test :
36+ name : Run Android tests
37+ runs-on : ubuntu-latest
38+
39+ steps :
40+ - name : Checkout
41+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
42+
43+ - name : Setup
44+ uses : ./.github/actions/setup
45+
46+ - name : Set up JDK 17
47+ uses : actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
48+ with :
49+ distribution : temurin
50+ java-version : ' 17'
51+
52+ - name : Setup Gradle
53+ uses : gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5
54+
55+ - name : Run Android unit tests
56+ working-directory : example/android
57+ run : ./gradlew :react-native-auth0:testDebugUnitTest
Original file line number Diff line number Diff line change @@ -1079,4 +1079,4 @@ This project is licensed under the MIT license. See the <a href="https://github.
10791079[ license-image ] : https://img.shields.io/npm/l/react-native-auth0.svg?style=flat-square
10801080[ license-url ] : #license
10811081[ downloads-image ] : https://img.shields.io/npm/dm/react-native-auth0.svg?style=flat-square
1082- [ downloads-url ] : https://npmjs.org/package/react-native-auth0
1082+ [ downloads-url ] : https://npmjs.org/package/react-native-auth0
Original file line number Diff line number Diff line change @@ -82,6 +82,9 @@ class A0Auth0Module(private val reactContext: ReactApplicationContext) : A0Auth0
8282 options.getMap(" defaultHeaders" )?.let { headers ->
8383 builder.defaultHeaders(headers.toHashMap().mapValues { it.value?.toString() ? : " " })
8484 }
85+ // Only honor enableLogging on debug builds: Auth0.Android logs full request/response
86+ // bodies at this level, including plaintext access/refresh/ID tokens from token-endpoint
87+ // responses. Test coverage in A0Auth0ModuleNetworkingOptionsTest ensures this gate holds.
8588 if (isDebuggable && options.hasKey(" enableLogging" )) {
8689 builder.enableLogging(options.getBoolean(" enableLogging" ))
8790 }
Original file line number Diff line number Diff line change @@ -80,10 +80,10 @@ class A0Auth0ModuleNetworkingOptionsTest {
8080 fun `enableLogging is ignored on a non-debuggable build even when requested` () {
8181 server.enqueue(MockResponse ().setBody(" {}" ))
8282
83- // If the debuggable gate is ever removed, Auth0.Android attaches its logging
84- // interceptor and this request crashes ("Method ... not mocked") because
85- // android.util.Log isn't stubbed in this unit test environment - that crash is
86- // exactly the regression this test is meant to catch .
83+ // SECURITY: If the isDebuggable gate is ever removed, Auth0.Android attaches its
84+ // logging interceptor which logs full request/response bodies (including tokens).
85+ // This test would crash ("Method android.util.Log not mocked") if that happens,
86+ // catching the security regression before it ships .
8787 val client = A0Auth0Module .buildNetworkingClient(
8888 JavaOnlyMap .of(" enableLogging" , true ),
8989 isDebuggable = false
Original file line number Diff line number Diff line change @@ -228,6 +228,15 @@ export interface Auth0Options {
228228 * Mirrors `DefaultClient.Builder` from the Auth0.Android SDK.
229229 *
230230 * @remarks Android only. Has no effect on iOS or web.
231+ *
232+ * @example
233+ * ```ts
234+ * networkingOptions: {
235+ * connectTimeout: 30,
236+ * readTimeout: 30,
237+ * defaultHeaders: { 'X-App-Version': '1.2.3' }
238+ * }
239+ * ```
231240 */
232241export interface NetworkingOptions {
233242 /** Connection timeout, in seconds. @default 10 */
You can’t perform that action at this time.
0 commit comments