public static DeviceRegistration FinishRegistration(StartedRegistration startedRegistration, RegisterResponse tokenResponse, HashSet <string> facets = null) { ClientData clientData = tokenResponse.GetClientData(); clientData.CheckContent(RegisterType, startedRegistration.Challenge, facets); RawRegisterResponse rawRegisterResponse = RawRegisterResponse.FromBase64(tokenResponse.RegistrationData); rawRegisterResponse.CheckSignature(startedRegistration.AppId, clientData.AsJson()); return(rawRegisterResponse.CreateDevice()); }