.. _leap_auth: ========================== Authorizing Access to Leap ========================== .. |TM| replace:: :sup:`TM` Ocean's SDK `releases 6.6 `_ and higher enable Leap\ |TM| authentication using the secure `OAuth 2.0 `_ industry standard. As described in the :std:doc:`oceandocs:overview/sapi` section, you require a Solver API (SAPI) token from your Leap account to submit problems to Leap solvers. .. note:: The `OAuth-based `_ authorization is provided for convenience but you also have the option of manually copying your SAPI token from Leap. For any new developer environment (for example, a Python `virtual environment `_ or a `GitHub Codespaces `_ *codespace*), authorize Ocean's access to your Leap account, using the secure `OAuth 2.0 `_ code exchange, by running one of the following `Ocean CLI `_ commands\ [#]_ from your terminal. Ocean authorization to access Leap is persisted across subsequent development sessions for this development environment. - In an environment such as an **IDE installed on your system**, where you can access `localhost `_ addresses from your browser, initiate the OAuth *redirect* flow:: dwave auth login - In an environment such as a **cloud IDE**, where access to `localhost `_ addresses from your browser might be blocked, you can initiate the alternative OAuth *out-of-band* flow:: dwave auth login --oob A page opened in your browser will lead you through the authorization procedure. .. [#] You can see help documentation for `Ocean CLI `_ commands and all their options with the CLI's ``--help`` option.