Skip to content

Commit

Permalink
Fix #116: Implement debug features
Browse files Browse the repository at this point in the history
Fix #113: Reveal PowerAuth instanceId
  • Loading branch information
hvge committed Oct 10, 2022
1 parent a14edb9 commit 2841f52
Show file tree
Hide file tree
Showing 11 changed files with 418 additions and 116 deletions.
4 changes: 4 additions & 0 deletions docs/Token-Based-Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,7 @@ try {
```

Note that by removing tokens locally, you will lose control of the tokens stored on the server.

## Read Next

- [Troubleshooting](Troubleshooting.md)
20 changes: 20 additions & 0 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Troubleshooting

## Enable debug log

In case you encounter a problem with this library, then try to turn-on a detailed debug log to provide a more information for the library developers:

```javascript
// Enable debug log with failed call to native function.
PowerAuthDebug.traceNativeCodeCalls(true)
// Trace all calls to native library
PowerAuthDebug.traceNativeCodeCalls(true, true)
```

<!-- begin box warning -->
The `PowerAuthDebug` class is effective only if global `__DEV__` constant is `true`. We don't want to log the sensitive information to the console in the production application.
<!-- end -->

## Read Next

- [Sample Integration](Sample-Integration.md)
1 change: 1 addition & 0 deletions docs/_Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@

**Additional Topics**

- [Troubleshooting](Troubleshooting.md)
- [Sample Integration](Sample-Integration.md)
14 changes: 10 additions & 4 deletions scripts/update-apps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,22 @@ esac

function LIB_PACKAGE
{

PUSH_DIR "$SRC"

LOG_LINE
LOG 'Building library archive'
LOG 'Compiling typescript'
LOG_LINE

PUSH_DIR "$SRC"
tsc -b

LOG_LINE
LOG 'Building library archive'
LOG_LINE

local file=( ${LIB}-*.tgz )
[[ -f "$file" ]] && $RM ${LIB}-*.tgz

tsc -b

npm pack
LIB_ARCHIVE=$(ls | grep ${LIB}-*.tgz)
[[ -z "$LIB_ARCHIVE" ]] && FAILURE "npm pack did not produce library archive"
Expand Down

0 comments on commit 2841f52

Please sign in to comment.