Fix up UIA types and remove unused prop (#29255)

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-02-17 09:53:26 +00:00
committed by GitHub
parent 52060235e4
commit dd2da5c132
7 changed files with 18 additions and 42 deletions

View File

@@ -27,13 +27,10 @@ import Spinner from "../views/elements/Spinner";
export const ERROR_USER_CANCELLED = new Error("User cancelled auth session");
type InteractiveAuthCallbackSuccess<T> = (
success: true,
response: T,
extra?: { emailSid?: string; clientSecret?: string },
) => Promise<void>;
type InteractiveAuthCallbackFailure = (success: false, response: IAuthData | Error) => Promise<void>;
export type InteractiveAuthCallback<T> = InteractiveAuthCallbackSuccess<T> & InteractiveAuthCallbackFailure;
export type InteractiveAuthCallback<T> = {
(success: true, response: T, extra?: { emailSid?: string; clientSecret?: string }): Promise<void>;
(success: false, response: IAuthData | Error): Promise<void>;
};
export interface InteractiveAuthProps<T> {
// matrix client to use for UI auth requests
@@ -49,10 +46,6 @@ export interface InteractiveAuthProps<T> {
emailSid?: string;
// If true, poll to see if the auth flow has been completed out-of-band
poll?: boolean;
// If true, components will be told that the 'Continue' button
// is managed by some other party and should not be managed by
// the component itself.
continueIsManaged?: boolean;
// continueText and continueKind are passed straight through to the AuthEntryComponent.
continueText?: string;
continueKind?: ContinueKind;
@@ -288,7 +281,6 @@ export default class InteractiveAuthComponent<T> extends React.Component<Interac
stageState={this.state.stageState}
fail={this.onAuthStageFailed}
setEmailSid={this.setEmailSid}
showContinue={!this.props.continueIsManaged}
onPhaseChange={this.onPhaseChange}
requestEmailToken={this.authLogic.requestEmailToken}
continueText={this.props.continueText}