MCPcopy Create free account
hub / github.com/NativeScript/firebase / checkActionCode

Method checkActionCode

packages/firebase-auth/index.ios.ts:1174–1206  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

1172 }
1173
1174 checkActionCode(code: string): Promise<ActionCodeInfo> {
1175 return new Promise((resolve, reject) => {
1176 if (!this.native) {
1177 reject();
1178 }
1179 this.native.checkActionCodeCompletion(code, (info, error) => {
1180 if (error) {
1181 reject(FirebaseError.fromNative(error));
1182 } else {
1183 const operation = toActionCodeOperation(info.operation);
1184 const actionCodeInfo: ActionCodeInfo = {
1185 data: {
1186 email: undefined,
1187 previousEmail: undefined,
1188 },
1189 operation,
1190 };
1191
1192 if (operation === ActionCodeInfoOperation.VerifyEmail || operation === ActionCodeInfoOperation.PasswordReset) {
1193 actionCodeInfo.data.email = info.email;
1194 } else if (operation === ActionCodeInfoOperation.RevertSecondFactorAddition) {
1195 actionCodeInfo.data.email = null;
1196 actionCodeInfo.data.previousEmail = null;
1197 } else if (operation === ActionCodeInfoOperation.RecoverEmail || operation === ActionCodeInfoOperation.VerifyAndChangeEmail) {
1198 actionCodeInfo.data.email = info.email;
1199 actionCodeInfo.data.previousEmail = info.previousEmail;
1200 }
1201
1202 resolve(actionCodeInfo);
1203 }
1204 });
1205 });
1206 }
1207
1208 applyActionCode(code: string): Promise<void> {
1209 return new Promise((resolve, reject) => {

Callers

nothing calls this directly

Calls 2

toActionCodeOperationFunction · 0.70
fromNativeMethod · 0.45

Tested by

no test coverage detected