我使用 Auth0 服务,它为我提供了两个 client_id - 用于开发和生产。但是,这必须是内置的源代码:
@Injectable({
providedIn: 'root'
})
export class AuthService {
// Create an observable of Auth0 instance of client
auth0Client$ = (from(
createAuth0Client({
domain: 'xxxxx',
client_id: 'Mx9x.........',
redirect_uri: `${window.location.origin}/authorize`,
audience: 'xxxx'
})
) as Observable<Auth0Client>).pipe(
shareReplay(1), // Every subscription receives the same shared value
catchError(err => throwError(err))
);
我很想在本地开发过程中使用一个,另一个用于生产构建。这是可行的吗?谢谢!