Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disableHttpsCheck is not a valid TypeScript option #268

Open
eddiemonge opened this issue Sep 28, 2023 · 0 comments
Open

disableHttpsCheck is not a valid TypeScript option #268

eddiemonge opened this issue Sep 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@eddiemonge
Copy link

eddiemonge commented Sep 28, 2023

Describe the bug

The examples for React Router 6 include disableHttpsCheck as an option in the examples, such as this one https://github.com/okta/okta-react/blob/master/samples/routing/react-router-dom-v6/src/config.ts. However, copying that file and adding a type to the config produces a type error.

image

Reproduction Steps?

Copy this config file and run TypeScript type check

import OktaAuth, { OktaAuthOptions } from '@okta/okta-auth-js';

const CLIENT_ID = process.env.CLIENT_ID || '{clientId}';
const ISSUER =
  process.env.ISSUER || 'https://{yourOktaDomain}.com/oauth2/default';
const OKTA_TESTING_DISABLEHTTPSCHECK =
  process.env.OKTA_TESTING_DISABLEHTTPSCHECK || false;
const BASENAME = process.env.PUBLIC_URL || '';
const REDIRECT_URI = `${window.location.origin}${BASENAME}/login/callback`;

const config = {
  oidc: {
    clientId: CLIENT_ID,
    disableHttpsCheck: OKTA_TESTING_DISABLEHTTPSCHECK,
    issuer: ISSUER,
    pkce: true,
    redirectUri: REDIRECT_URI,
    scopes: ['openid', 'profile', 'email'],
  } satisfies OktaAuthOptions,
};

SDK Versions

  System:
    OS: macOS 13.5.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 134.92 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.6.0 - ~/.config/nvm/versions/node/v20.6.0/bin/node
    npm: 10.0.0 - ~/.config/nvm/versions/node/v20.6.0/bin/npm
  Browsers:
    Chrome: 117.0.5938.92
    Safari: 16.6
  npmPackages:
    @okta/okta-auth-js: ^7.3.0 => 7.4.2 
    @okta/okta-react: ^6.7.0 => 6.7.0 
    react: ^18.2.0 => 18.2.0 
    react-dom: ^18.2.0 => 18.2.0 
    react-router-dom: ^6.4.0 => 6.16.0 

Additional Information

No response

@eddiemonge eddiemonge added the bug Something isn't working label Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant