File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
services/static-webserver/client/source/class/osparc/auth Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,28 @@ qx.Class.define("osparc.auth.Manager", {
116116 return osparc . data . Resources . fetch ( "auth" , "resendCode" , params ) ;
117117 } ,
118118
119+ updatePhoneNumber : function ( newPhoneNumber ) {
120+ const params = {
121+ data : {
122+ phone : newPhoneNumber
123+ }
124+ } ;
125+ return osparc . data . Resources . fetch ( "profile" , "phoneRegister" , params ) ;
126+ } ,
127+
128+ validateCodeUpdatePhone : function ( code , loginCbk , failCbk , context ) {
129+ const params = {
130+ data : {
131+ code
132+ }
133+ } ;
134+ osparc . data . Resources . fetch ( "profile" , "phoneConfirm" , params )
135+ . then ( data => {
136+ loginCbk . call ( context , data ) ;
137+ } )
138+ . catch ( err => failCbk . call ( context , err . message ) ) ;
139+ } ,
140+
119141 isLoggedIn : function ( ) {
120142 return osparc . auth . Data . getInstance ( ) . isLoggedIn ( ) ;
121143 } ,
You can’t perform that action at this time.
0 commit comments