Please provide the following:
- SDK Version: 38.0.8
- Platforms(Android/iOS/web/all): Ios
I have been following the basic tutorial for okta adn i am unable to get okta jwt for my user. How can i pass the username and password with this request also i am geting this Error: The authorization server does not support obtaining an authorization code using this method.
import * as React from 'react';
import * as WebBrowser from 'expo-web-browser';
import { makeRedirectUri, useAuthRequest, useAutoDiscovery } from 'expo-auth-session';
import { Button, Platform } from 'react-native';
WebBrowser.maybeCompleteAuthSession();
const useProxy = Platform.select({ web: false, default: true })
export default function App() {
// Endpoint
const discovery = useAutoDiscovery('https://<OKTA_DOMAIN>.com/oauth2/default');
// Request
const [request, response, promptAsync] = useAuthRequest(
{
clientId: 'CLIENT_ID',
scopes: ['openid', 'profile'],
// For usage in managed apps using the proxy
redirectUri: makeRedirectUri({
// For usage in bare and standalone
native: 'com.okta.<OKTA_DOMAIN>:/callback',
useProxy,
}),
},
discovery
);
React.useEffect(() => {
if (response?.type === 'success') {
const { code } = response.params;
}
}, [response]);
return (
<Button
disabled={!request}
title="Login"
onPress={() => {
promptAsync({ useProxy });
}}
/>
);
}