An oven is the way to go.
Toasting on a frying pan is a pain because you have to stand there shaking it for so long and it is far to easy to scorch if you pause.
I have seen some recipes call for low oven temps but I use 350F (175C) for 10 to 15 minutes stirring a few times. Some sources online recommend as low as 5 minutes but I personally have not ever had them done that quickly. They still have to be checked or they will burn.
I like to use my toaster oven because it heats up faster and is cheaper to run.
I have used an air popcorn popper with good results. Don't overfill it and remove them when they smell nutty. It goes very fast but you have to do them in batches if you have many.
For a pie or other sweet applications, I like to toss the nuts in butter and brown sugar and let them candy in the oven. The fat makes it harder to burn them. Obviously this won't fit for all recipes.
I personally have not had good results using the microwave. Some people swear by it but it seems to me to make them a little gummy.