(_, name)
| 28 | ): AuthProviderType => { |
| 29 | const proxy = new Proxy(provider, { |
| 30 | get(_, name) { |
| 31 | const shouldIntercept = |
| 32 | AuthProviderInterceptedMethods.includes(name.toString()) && |
| 33 | provider[name.toString()] != null; |
| 34 | |
| 35 | if (shouldIntercept) { |
| 36 | return async (...args: any[]) => { |
| 37 | await refreshAuth(); |
| 38 | return provider[name.toString()](...args); |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | return provider[name.toString()]; |
| 43 | }, |
| 44 | }); |
| 45 | |
| 46 | return proxy; |
no outgoing calls
no test coverage detected