Re run the CLI command for generating access token


#1

I have followed this https://www.ory.sh/run-oauth2-server-open-source-api-security/ link for our own OAuth server after executing the last command which is

--network hydraguide \
  -p 9010:9010 \
  oryd/hydra:v1.0.0-beta.8 \
  token user \
    --port 9010 \
    --auth-url http://127.0.0.1:9000/oauth2/auth \
    --token-url http://ory-hydra-example--hydra:4444/oauth2/token \
    --client-id another-consumer \
    --client-secret consumer-secret \
    --scope openid,offline \
    --redirect http://127.0.0.1:9010/callback

Setting up home route on http://127.0.0.1:9010/
Setting up callback listener on http://127.0.0.1:4445/callback
Press ctrl + c on Linux / Windows or cmd + c on OSX to end the process.
If your browser does not open automatically, navigate to:

        http://127.0.0.1:9010/

so, first-time access token generated but if I want to generate the second time than I have to re-run this command I don’t know why? I have to re-run it or is there a better option available than this one.


#2

Because this is just to get you started, like for a tutorial. This is not to be used in production or stuff like that.


#3

what should I need to do for a production side? because I am working on a server side.


#4

Use what you normally would for performing OAuth2.


#5

if i will follow same tutorial on production side than it will work?
if you have anything related this than please let me know i wanted to try on server and also i don’t want to re run it.
thanks in advance