[−][src]Function fxaclient_ffi::fxa_begin_oauth_flow
#[no_mangle]pub unsafe extern "C" fn fxa_begin_oauth_flow(
handle: u64,
scope: FfiStr<'_>,
entrypoint: FfiStr<'_>,
metrics_params: *const u8,
metrics_params_len: i32,
error: &mut ExternError
) -> *mut c_char
Request a OAuth token by starting a new OAuth flow.
This function returns a URL string that the caller should open in a webview.
Once the user has confirmed the authorization grant, they will get redirected to redirect_url
:
the caller must intercept that redirection, extract the code
and state
query parameters and call
[fxa_complete_oauth_flow] to complete the flow.
Safety
A destructor [fxa_str_free] is provided for releasing the memory for this pointer type.