Wraps Stytch's revoke Session endpoint and revokes all Sessions for a given Member.
Revoke sessions for Member
Response fields
request_id string
status_code int
import { Text, TouchableOpacity, View } from 'react-native';
import React, { useCallback } from 'react';
import { useStytchB2BClient } from '@stytch/react-native/b2b';
export const RevokeSessionsButton = () => {
const stytch = useStytchB2BClient();
const revokeSessions = useCallback(() => {
stytch.session.revokeForMember({ member_id: 'member-test-32fc5024-9c09-4da3-bd2e-c9ce4da9375f' });
}, [stytch]);
return (
<View>
<TouchableOpacity onPress={revokeSessions}>
<Text>Revoke sessions</Text>
</TouchableOpacity>
</View>
);
};
RESPONSE
200
{
"status_code": 200,
"request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141"
}