Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit d6c097e

Browse files
committed
[Release] v0.2.0 Gateway + JWT
1 parent a144e14 commit d6c097e

File tree

5 files changed

+376
-385
lines changed

5 files changed

+376
-385
lines changed

README.md

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ React Native SDK for Cryptr Authentication through SSO
44

55
## Summary
66

7+
- [Expo](#expo)
78
- [Prerequisites](#prerequisites)
89
- [Android](#android)
910
- [iOS](#ios)
@@ -16,6 +17,10 @@ React Native SDK for Cryptr Authentication through SSO
1617
- [Hooks](#hooks)
1718
- [Components](#components)
1819

20+
## Expo integration
21+
22+
:warning: this is not compatible with Expo Go (neither `link`) and requires a run (`expo run`)
23+
1924
## Prerequisites
2025

2126
### Android
@@ -56,7 +61,7 @@ npm install @cryptr/cryptr-react-native
5661

5762
**Check your minSdkVersion**
5863

59-
In `android/build.gradle` check that the version is `23`
64+
In `android/build.gradle` check that the version is `23` or greater
6065

6166
```
6267
//android/build.gradle
@@ -65,7 +70,7 @@ minSdkVersion = 23
6570

6671
**Update your manifestPlaceholders**
6772

68-
In `android/app/build.gradle` setup as follow:
73+
In `android/app/build.gradle` setup as below. If `manifestPlaceholders` is not present add it with proper values.
6974

7075
```
7176
android {
@@ -77,7 +82,7 @@ android {
7782
}
7883
```
7984

80-
The `cryptrDomain` should have the same value in allowed redirect URI for this app on Cryptr.
85+
The `cryptrDomain` should have the same value in the allowed redirect URI for this app on Cryptr.
8186

8287
You are now good to go.
8388

@@ -86,8 +91,7 @@ You are now good to go.
8691
### Basis
8792

8893
Cryptr implementation is based on React Context and Provider.
89-
90-
At top level of your React Native App set your configuration you got on first step, as this one:
94+
At the top level of your React Native App set the configuration you got on the first step, like this one:
9195

9296
```js
9397
const config: CryptrConfig = {
@@ -104,22 +108,7 @@ const config: CryptrConfig = {
104108
Then you can use it into `<CryptrProvider {...config}>`
105109

106110
Example:
107-
108-
```js
109-
// App.js
110-
111-
const config: CryptrConfig = {/*..*/};
112-
113-
const App = () => {
114-
return (
115-
<CryptrProvider {...config}>
116-
// Cryptr Auth Session context
117-
</CryptrProvider>
118-
)
119-
}
120-
```
121-
122-
Inside this Provider you can handle Cryptr Authentication using our Hooks and/or components.
111+
Inside this Provider, you can handle Cryptr Authentication using our Hooks and/or components.
123112

124113
### Hooks
125114

@@ -203,11 +192,11 @@ signinWithSSO(idpID: string, successCallback?: (data: any) => any, errorCallback
203192

204193
#### signinWithSSOGateway
205194

206-
Hook action to sign in the user using Cryptr Gateway when you don't know what is the precise ID used by your end user. You can precise a subset of IDP_ID that user will be able to consume, if none end-user will be able to find his by email or organziation_domain.
195+
Hook action to sign in the user using Cryptr Gateway when you don't know what is the precise ID used by your end user. You can precise a subset of IDP_ID that the user will be able to consume if none is provided, the end-user will be able to find his by email or organziation_domain.
207196

208-
When you set one string for `idpId` behavior is same as `signinWithSSO`
197+
When you set one string for `idpId` behavior is the same as `signinWithSSO``
209198

210-
:warning: requires a proper setup of you different organization
199+
:warning: requires a proper setup of your different organizations
211200

212201

213202
```js
@@ -230,7 +219,7 @@ refreshTokens(callback?: (data: any) => any)
230219

231220
#### logOut
232221

233-
Hook action to log out user.
222+
Hook action to log out the user.
234223

235224

236225
```js
@@ -255,7 +244,7 @@ const { error } = useCryptr()
255244

256245
#### isLoading
257246

258-
Hook to inform you about that a Cryptr process is in progress.
247+
Hook to inform you that a Cryptr process is in progress.
259248

260249
The return type is a <u>**boolean**</u>
261250

@@ -265,7 +254,7 @@ const { isLoading } = useCryptr()
265254

266255
### Components
267256

268-
This SDK also includes Component to simplify your integration.
257+
This SDK also includes Components to simplify your integration.
269258

270259
- `SsoSigInButton` to login using SSO (hides when session is already active [`autoHide={false}` to disable])
271260

example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- boost-for-react-native (1.63.0)
3-
- cryptr-cryptr-react-native (0.1.1):
3+
- cryptr-cryptr-react-native (0.2.0):
44
- React-Core
55
- DoubleConversion (1.1.6)
66
- FBLazyVector (0.63.4)
@@ -342,12 +342,12 @@ EXTERNAL SOURCES:
342342

343343
SPEC CHECKSUMS:
344344
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
345-
cryptr-cryptr-react-native: 926ce3503cfada3adb3de7a32a488d1cea284ba0
346-
DoubleConversion: cde416483dac037923206447da6e1454df403714
345+
cryptr-cryptr-react-native: bc192d3f546f84bdcdcc7bf3be7c08818fc9e1f6
346+
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
347347
FBLazyVector: 3bb422f41b18121b71783a905c10e58606f7dc3e
348348
FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e
349349
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
350-
glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3
350+
glog: 476ee3e89abb49e07f822b48323c51c57124b572
351351
RCTRequired: 082f10cd3f905d6c124597fd1c14f6f2655ff65e
352352
RCTTypeSafety: 8c9c544ecbf20337d069e4ae7fd9a377aadf504b
353353
React: b0a957a2c44da4113b0c4c9853d8387f8e64e615

0 commit comments

Comments
 (0)