Authorization Information
Get the token and uid of the current user
import {RNGizUserManagerModule} from 'react-native-gizwits-sdk-v5';
const data = await RNGizUserManagerModule.getAuthorizeData();
if (data.success) {
const {uid, token} = data.data!;
}Set token and uid
ℹ️
In some special cases, it may be necessary to manually set the token and uid. You can use the following interface for this purpose.
import {RNGizUserManagerModule} from 'react-native-gizwits-sdk-v5';
const data = await RNGizUserManagerModule.updateAuthorizeData({uid, token});Use getAuthorizeData() to retrieve authorization data consistently across platforms. Android login methods return native Unit; do not rely on the RN type declaration to read data.uid from login results. Android registration results use userId. getAuthorizeData() normalizes these values to { uid, token }.