Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

redirectUrl problem #130

Open
kosnkow opened this issue Apr 9, 2019 · 1 comment
Open

redirectUrl problem #130

kosnkow opened this issue Apr 9, 2019 · 1 comment

Comments

@kosnkow
Copy link

kosnkow commented Apr 9, 2019

Hello, I debuging on my https://localhost:3000 some outlook plugin , I am wondering how redirectUrl should be set ? If I set to https://localhost:3000 it does not work.

@schmitch
Copy link

schmitch commented May 16, 2019

it is extremly badly done. however depending on how you created your application the dev server will have some html sites which should be your returnUrl.

Currently if I use yeoman to generate a word-addin it will create the following structure:

.
├── commands
│   ├── commands.html
│   └── commands.ts
└── taskpane
    ├── app
    │   ├── app.component.html
    │   ├── app.component.ts
    │   └── app.module.ts
    ├── authenticator.ts
    ├── taskpane.css
    ├── taskpane.html
    └── taskpane.ts

Now it also depends on the created webpack config which contains plugins like that: HtmlWebpackPlugin which have a filename attribute . if the filename attribute is taskpane.html you can open that page with https://localhost:3000/taskpane.html and thus that should be your redirect uri.

You can also set your redirect uri to window.location however that means that you need to have a block of:

Office.initialize = reason => {
    if (OfficeHelpers.Authenticator.isAuthDialog()) {
        return;
    }

wherever an authenticator could be opened.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants